src/main/kotlin/de/uapcore/lightpit/types/WebColor.kt

changeset 209
c9c6abf167c7
parent 184
e8eecee6aadf
equal deleted inserted replaced
208:785820da6485 209:c9c6abf167c7
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)

mercurial