33 class WebColor(arg: String) { |
33 class WebColor(arg: String) { |
34 |
34 |
35 /** |
35 /** |
36 * The color representation with the leading hash symbol. |
36 * The color representation with the leading hash symbol. |
37 */ |
37 */ |
38 val color: String = (if (arg.startsWith("#")) arg else "#$arg").toUpperCase() |
38 val color: String = (if (arg.startsWith("#")) arg else "#$arg").uppercase() |
39 |
39 |
40 /** |
40 /** |
41 * The hex representation without the leading hash symbol. |
41 * The hex representation without the leading hash symbol. |
42 */ |
42 */ |
43 val hex: String = color.substring(1) |
43 val hex: String = color.substring(1) |