This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Quick function implementation to convert a color-string of the form "#?[0-9a-fA-F]{3}" | |
| * into a tripe containg rgb color information as a percentage. | |
| */ | |
| def web2Percentage(str: String): (Float, Float, Float) = { | |
| val hexcolor = "([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])".r | |
| val color = if (str startsWith "#") str.tail else str | |
| def hex(str: String): Int = |