commonMain.WebColors.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of color Show documentation
Show all versions of color Show documentation
A collection of drawing/charting utilities
package com.juul.krayon.color
// HTML Basic Colors
// - Greyscale
public val white: Color = Color(0xFFFFFFFF.toInt())
public val silver: Color = Color(0xFFC0C0C0.toInt())
public val gray: Color = Color(0xFF808080.toInt())
public val black: Color = Color(0xFF000000.toInt())
// - Colors
public val red: Color = Color(0xFFFF0000.toInt())
public val maroon: Color = Color(0xFF800000.toInt())
public val yellow: Color = Color(0xFFFFFF00.toInt())
public val olive: Color = Color(0xFF808000.toInt())
public val lime: Color = Color(0xFF00FF00.toInt())
public val green: Color = Color(0xFF008000.toInt())
public val aqua: Color = Color(0xFF00FFFF.toInt())
public val teal: Color = Color(0xFF008080.toInt())
public val blue: Color = Color(0xFF0000FF.toInt())
public val navy: Color = Color(0xFF000080.toInt())
public val fuchsia: Color = Color(0xFFFF00FF.toInt())
public val purple: Color = Color(0xFF800080.toInt())
// HTML Extended Colors
// - Pink Colors
public val mediumVioletRed: Color = Color(0xFFC71585.toInt())
public val deepPink: Color = Color(0xFFFF1493.toInt())
public val paleVioletRed: Color = Color(0xFFDB7093.toInt())
public val hotPink: Color = Color(0xFFFF69B4.toInt())
public val lightPink: Color = Color(0xFFFFB6C1.toInt())
public val pink: Color = Color(0xFFFFC0CB.toInt())
// - Red Colors
public val darkRed: Color = Color(0xFF8B0000.toInt())
public val firebrick: Color = Color(0xFFB22222.toInt())
public val crimson: Color = Color(0xFFDC143C.toInt())
public val indianRed: Color = Color(0xFFCD5C5C.toInt())
public val lightCoral: Color = Color(0xFFF08080.toInt())
public val salmon: Color = Color(0xFFFA8072.toInt())
public val lightSalmon: Color = Color(0xFFFFA07A.toInt())
// - Orange Colors
public val orangeRed: Color = Color(0xFFFF4500.toInt())
public val tomato: Color = Color(0xFFFF6347.toInt())
public val darkOrange: Color = Color(0xFFFF8C00.toInt())
public val coral: Color = Color(0xFFFF7F50.toInt())
public val orange: Color = Color(0xFFFFA500.toInt())
// - Yellow Colors
public val darkKhaki: Color = Color(0xFFBDB76B.toInt())
public val gold: Color = Color(0xFFFFD700.toInt())
public val khaki: Color = Color(0xFFF0E68C.toInt())
public val peachPuff: Color = Color(0xFFFFDAB9.toInt())
public val paleGoldenrod: Color = Color(0xFFEEE8AA.toInt())
public val moccasin: Color = Color(0xFFFFE4B5.toInt())
public val papayaWhip: Color = Color(0xFFFFEFD5.toInt())
public val lightGoldenrodYellow: Color = Color(0xFFFAFAD2.toInt())
public val lemonChiffon: Color = Color(0xFFFFFACD.toInt())
public val lightYellow: Color = Color(0xFFFFFFE0.toInt())
// - Brown Colors
public val brown: Color = Color(0xFFA52A2A.toInt())
public val saddleBrown: Color = Color(0xFF8B4513.toInt())
public val sienna: Color = Color(0xFFA0522D.toInt())
public val chocolate: Color = Color(0xFFD2691E.toInt())
public val darkGoldenrod: Color = Color(0xFFB8860B.toInt())
public val peru: Color = Color(0xFFCD853F.toInt())
public val rosyBrown: Color = Color(0xFFBC8F8F.toInt())
public val goldenrod: Color = Color(0xFFDAA520.toInt())
public val sandyBrown: Color = Color(0xFFF4A460.toInt())
public val tan: Color = Color(0xFFD2B48C.toInt())
public val burlywood: Color = Color(0xFFDEB887.toInt())
public val wheat: Color = Color(0xFFF5DEB3.toInt())
public val navajoWhite: Color = Color(0xFFFFDEAD.toInt())
public val bisque: Color = Color(0xFFFFE4C4.toInt())
public val blanchedAlmond: Color = Color(0xFFFFEBCD.toInt())
public val cornsilk: Color = Color(0xFFFFF8DC.toInt())
// - Green Colors
public val darkGreen: Color = Color(0xFF006400.toInt())
public val darkOliveGreen: Color = Color(0xFF556B2F.toInt())
public val forestGreen: Color = Color(0xFF228B22.toInt())
public val seaGreen: Color = Color(0xFF2E8B57.toInt())
public val oliveDrab: Color = Color(0xFF6B8E23.toInt())
public val mediumSeaGreen: Color = Color(0xFF3CB371.toInt())
public val limeGreen: Color = Color(0xFF32CD32.toInt())
public val springGreen: Color = Color(0xFF00FF7F.toInt())
public val mediumSpringGreen: Color = Color(0xFF00FA9A.toInt())
public val darkSeaGreen: Color = Color(0xFF8FBC8F.toInt())
public val mediumAquamarine: Color = Color(0xFF66CDAA.toInt())
public val yellowGreen: Color = Color(0xFF9ACD32.toInt())
public val lawnGreen: Color = Color(0xFF7CFC00.toInt())
public val chartreuse: Color = Color(0xFF7FFF00.toInt())
public val lightGreen: Color = Color(0xFF90EE90.toInt())
public val greenYellow: Color = Color(0xFFADFF2F.toInt())
public val paleGreen: Color = Color(0xFF98FB98.toInt())
// - Cyan Colors
public val darkCyan: Color = Color(0xFF008B8B.toInt())
public val lightSeaGreen: Color = Color(0xFF20B2AA.toInt())
public val cadetBlue: Color = Color(0xFF5F9EA0.toInt())
public val darkTurquoise: Color = Color(0xFF00CED1.toInt())
public val mediumTurquoise: Color = Color(0xFF48D1CC.toInt())
public val turquoise: Color = Color(0xFF40E0D0.toInt())
public val cyan: Color = Color(0xFF00FFFF.toInt())
public val aquamarine: Color = Color(0xFF7FFFD4.toInt())
public val paleTurquoise: Color = Color(0xFFAFEEEE.toInt())
public val lightCyan: Color = Color(0xFFE0FFFF.toInt())
// - Blue Colors
public val darkBlue: Color = Color(0xFF00008B.toInt())
public val mediumBlue: Color = Color(0xFF0000CD.toInt())
public val midnightBlue: Color = Color(0xFF191970.toInt())
public val royalBlue: Color = Color(0xFF4169E1.toInt())
public val steelBlue: Color = Color(0xFF4682B4.toInt())
public val dodgerBlue: Color = Color(0xFF1E90FF.toInt())
public val deepSkyBlue: Color = Color(0xFF00BFFF.toInt())
public val cornflowerBlue: Color = Color(0xFF6495ED.toInt())
public val skyBlue: Color = Color(0xFF87CEEB.toInt())
public val lightSkyBlue: Color = Color(0xFF87CEFA.toInt())
public val lightSteelBlue: Color = Color(0xFFB0C4DE.toInt())
public val lightBlue: Color = Color(0xFFADD8E6.toInt())
public val powderBlue: Color = Color(0xFFB0E0E6.toInt())
// - Purple, Violet, and Magenta Colors
public val indigo: Color = Color(0xFF4B0082.toInt())
public val darkMagenta: Color = Color(0xFF8B008B.toInt())
public val darkViolet: Color = Color(0xFF9400D3.toInt())
public val darkSlateBlue: Color = Color(0xFF483D8B.toInt())
public val blueViolet: Color = Color(0xFF8A2BE2.toInt())
public val darkOrchid: Color = Color(0xFF9932CC.toInt())
public val magenta: Color = Color(0xFFFF00FF.toInt())
public val slateBlue: Color = Color(0xFF6A5ACD.toInt())
public val mediumSlateBlue: Color = Color(0xFF7B68EE.toInt())
public val mediumOrchid: Color = Color(0xFFBA55D3.toInt())
public val mediumPurple: Color = Color(0xFF9370DB.toInt())
public val orchid: Color = Color(0xFFDA70D6.toInt())
public val violet: Color = Color(0xFFEE82EE.toInt())
public val plum: Color = Color(0xFFDDA0DD.toInt())
public val thistle: Color = Color(0xFFD8BFD8.toInt())
public val lavender: Color = Color(0xFFE6E6FA.toInt())
// - White Colors
public val mistyRose: Color = Color(0xFFFFE4E1.toInt())
public val antiqueWhite: Color = Color(0xFFFAEBD7.toInt())
public val linen: Color = Color(0xFFFAF0E6.toInt())
public val beige: Color = Color(0xFFF5F5DC.toInt())
public val whiteSmoke: Color = Color(0xFFF5F5F5.toInt())
public val lavenderBlush: Color = Color(0xFFFFF0F5.toInt())
public val oldLace: Color = Color(0xFFFDF5E6.toInt())
public val aliceBlue: Color = Color(0xFFF0F8FF.toInt())
public val seashell: Color = Color(0xFFFFF5EE.toInt())
public val ghostWhite: Color = Color(0xFFF8F8FF.toInt())
public val honeydew: Color = Color(0xFFF0FFF0.toInt())
public val floralWhite: Color = Color(0xFFFFFAF0.toInt())
public val azure: Color = Color(0xFFF0FFFF.toInt())
public val mintCream: Color = Color(0xFFF5FFFA.toInt())
public val snow: Color = Color(0xFFFFFAFA.toInt())
public val ivory: Color = Color(0xFFFFFFF0.toInt())
// - Gray Colors
public val darkSlateGray: Color = Color(0xFF2F4F4F.toInt())
public val dimGray: Color = Color(0xFF696969.toInt())
public val slateGray: Color = Color(0xFF708090.toInt())
public val lightSlateGray: Color = Color(0xFF778899.toInt())
public val darkGray: Color = Color(0xFFA9A9A9.toInt())
public val lightGray: Color = Color(0xFFD3D3D3.toInt())
public val gainsboro: Color = Color(0xFFDCDCDC.toInt())
// CSS Colors not in HTML
public val transparent: Color = Color(0x00000000.toInt())
public val rebeccaPurple: Color = Color(0xFF663399.toInt())
internal val keywordMap = mapOf(
"white" to white,
"silver" to silver,
"gray" to gray,
"black" to black,
"red" to red,
"maroon" to maroon,
"yellow" to yellow,
"olive" to olive,
"lime" to lime,
"green" to green,
"aqua" to aqua,
"teal" to teal,
"blue" to blue,
"navy" to navy,
"fuchsia" to fuchsia,
"purple" to purple,
"mediumvioletred" to mediumVioletRed,
"deeppink" to deepPink,
"palevioletred" to paleVioletRed,
"hotpink" to hotPink,
"lightpink" to lightPink,
"pink" to pink,
"darkred" to darkRed,
"firebrick" to firebrick,
"crimson" to crimson,
"indianred" to indianRed,
"lightcoral" to lightCoral,
"salmon" to salmon,
"lightsalmon" to lightSalmon,
"orangered" to orangeRed,
"tomato" to tomato,
"darkorange" to darkOrange,
"coral" to coral,
"orange" to orange,
"darkkhaki" to darkKhaki,
"gold" to gold,
"khaki" to khaki,
"peachpuff" to peachPuff,
"palegoldenrod" to paleGoldenrod,
"moccasin" to moccasin,
"papayawhip" to papayaWhip,
"lightgoldenrodyellow" to lightGoldenrodYellow,
"lemonchiffon" to lemonChiffon,
"lightyellow" to lightYellow,
"brown" to brown,
"saddlebrown" to saddleBrown,
"sienna" to sienna,
"chocolate" to chocolate,
"darkgoldenrod" to darkGoldenrod,
"peru" to peru,
"rosybrown" to rosyBrown,
"goldenrod" to goldenrod,
"sandybrown" to sandyBrown,
"tan" to tan,
"burlywood" to burlywood,
"wheat" to wheat,
"navajowhite" to navajoWhite,
"bisque" to bisque,
"blanchedalmond" to blanchedAlmond,
"cornsilk" to cornsilk,
"darkgreen" to darkGreen,
"darkolivegreen" to darkOliveGreen,
"forestgreen" to forestGreen,
"seagreen" to seaGreen,
"olivedrab" to oliveDrab,
"mediumseagreen" to mediumSeaGreen,
"limegreen" to limeGreen,
"springgreen" to springGreen,
"mediumspringgreen" to mediumSpringGreen,
"darkseagreen" to darkSeaGreen,
"mediumaquamarine" to mediumAquamarine,
"yellowgreen" to yellowGreen,
"lawngreen" to lawnGreen,
"chartreuse" to chartreuse,
"lightgreen" to lightGreen,
"greenyellow" to greenYellow,
"palegreen" to paleGreen,
"darkcyan" to darkCyan,
"lightseagreen" to lightSeaGreen,
"cadetblue" to cadetBlue,
"darkturquoise" to darkTurquoise,
"mediumturquoise" to mediumTurquoise,
"turquoise" to turquoise,
"cyan" to cyan,
"aquamarine" to aquamarine,
"paleturquoise" to paleTurquoise,
"lightcyan" to lightCyan,
"darkblue" to darkBlue,
"mediumblue" to mediumBlue,
"midnightblue" to midnightBlue,
"royalblue" to royalBlue,
"steelblue" to steelBlue,
"dodgerblue" to dodgerBlue,
"deepskyblue" to deepSkyBlue,
"cornflowerblue" to cornflowerBlue,
"skyblue" to skyBlue,
"lightskyblue" to lightSkyBlue,
"lightsteelblue" to lightSteelBlue,
"lightblue" to lightBlue,
"powderblue" to powderBlue,
"indigo" to indigo,
"darkmagenta" to darkMagenta,
"darkviolet" to darkViolet,
"darkslateblue" to darkSlateBlue,
"blueviolet" to blueViolet,
"darkorchid" to darkOrchid,
"magenta" to magenta,
"slateblue" to slateBlue,
"mediumslateblue" to mediumSlateBlue,
"mediumorchid" to mediumOrchid,
"mediumpurple" to mediumPurple,
"orchid" to orchid,
"violet" to violet,
"plum" to plum,
"thistle" to thistle,
"lavender" to lavender,
"mistyrose" to mistyRose,
"antiquewhite" to antiqueWhite,
"linen" to linen,
"beige" to beige,
"whitesmoke" to whiteSmoke,
"lavenderblush" to lavenderBlush,
"oldlace" to oldLace,
"aliceblue" to aliceBlue,
"seashell" to seashell,
"ghostwhite" to ghostWhite,
"honeydew" to honeydew,
"floralwhite" to floralWhite,
"azure" to azure,
"mintcream" to mintCream,
"snow" to snow,
"ivory" to ivory,
"darkslategray" to darkSlateGray,
"dimgray" to dimGray,
"slategray" to slateGray,
"lightslategray" to lightSlateGray,
"darkgray" to darkGray,
"lightgray" to lightGray,
"gainsboro" to gainsboro,
"transparent" to transparent,
"rebeccapurple" to rebeccaPurple
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy