Skip to content
named_colors

named_colors

Mojo module 🡭

named_colors

Named colors: the CSS Color Module Level 3 / X11 “extended color keywords” list (https://www.w3.org/TR/css-color-3/#svg-color) plus REBECCAPURPLE (Level 4), as Color constants, so a caller can write CORNFLOWERBLUE instead of Color(100, 149, 237). Each name is the CSS keyword uppercased with no separators (CORNFLOWERBLUE, not CORNFLOWER_BLUE), so it matches the spec and any color picker directly. Both CSS spellings of the gray names (GRAY/GREY, DARKGRAY/DARKGREY, …) are included with identical values.

comptime constants, usable anywhere a Color literal is, with no runtime lookup. Sorted alphabetically by name, matching the CSS spec’s own listing. Re-exported from the package root, so from canvas import CORNFLOWERBLUE resolves.

Aliases

  • ALICEBLUE = Color(UInt8(240), UInt8(248), UInt8(255), UInt8(255))
  • ANTIQUEWHITE = Color(UInt8(250), UInt8(235), UInt8(215), UInt8(255))
  • AQUA = Color(UInt8(0), UInt8(255), UInt8(255), UInt8(255))
  • AQUAMARINE = Color(UInt8(127), UInt8(255), UInt8(212), UInt8(255))
  • AZURE = Color(UInt8(240), UInt8(255), UInt8(255), UInt8(255))
  • BEIGE = Color(UInt8(245), UInt8(245), UInt8(220), UInt8(255))
  • BISQUE = Color(UInt8(255), UInt8(228), UInt8(196), UInt8(255))
  • BLACK = Color(UInt8(0), UInt8(0), UInt8(0), UInt8(255))
  • BLANCHEDALMOND = Color(UInt8(255), UInt8(235), UInt8(205), UInt8(255))
  • BLUE = Color(UInt8(0), UInt8(0), UInt8(255), UInt8(255))
  • BLUEVIOLET = Color(UInt8(138), UInt8(43), UInt8(226), UInt8(255))
  • BROWN = Color(UInt8(165), UInt8(42), UInt8(42), UInt8(255))
  • BURLYWOOD = Color(UInt8(222), UInt8(184), UInt8(135), UInt8(255))
  • CADETBLUE = Color(UInt8(95), UInt8(158), UInt8(160), UInt8(255))
  • CHARTREUSE = Color(UInt8(127), UInt8(255), UInt8(0), UInt8(255))
  • CHOCOLATE = Color(UInt8(210), UInt8(105), UInt8(30), UInt8(255))
  • CORAL = Color(UInt8(255), UInt8(127), UInt8(80), UInt8(255))
  • CORNFLOWERBLUE = Color(UInt8(100), UInt8(149), UInt8(237), UInt8(255))
  • CORNSILK = Color(UInt8(255), UInt8(248), UInt8(220), UInt8(255))
  • CRIMSON = Color(UInt8(220), UInt8(20), UInt8(60), UInt8(255))
  • CYAN = Color(UInt8(0), UInt8(255), UInt8(255), UInt8(255))
  • DARKBLUE = Color(UInt8(0), UInt8(0), UInt8(139), UInt8(255))
  • DARKCYAN = Color(UInt8(0), UInt8(139), UInt8(139), UInt8(255))
  • DARKGOLDENROD = Color(UInt8(184), UInt8(134), UInt8(11), UInt8(255))
  • DARKGRAY = Color(UInt8(169), UInt8(169), UInt8(169), UInt8(255))
  • DARKGREEN = Color(UInt8(0), UInt8(100), UInt8(0), UInt8(255))
  • DARKGREY = Color(UInt8(169), UInt8(169), UInt8(169), UInt8(255))
  • DARKKHAKI = Color(UInt8(189), UInt8(183), UInt8(107), UInt8(255))
  • DARKMAGENTA = Color(UInt8(139), UInt8(0), UInt8(139), UInt8(255))
  • DARKOLIVEGREEN = Color(UInt8(85), UInt8(107), UInt8(47), UInt8(255))
  • DARKORANGE = Color(UInt8(255), UInt8(140), UInt8(0), UInt8(255))
  • DARKORCHID = Color(UInt8(153), UInt8(50), UInt8(204), UInt8(255))
  • DARKRED = Color(UInt8(139), UInt8(0), UInt8(0), UInt8(255))
  • DARKSALMON = Color(UInt8(233), UInt8(150), UInt8(122), UInt8(255))
  • DARKSEAGREEN = Color(UInt8(143), UInt8(188), UInt8(143), UInt8(255))
  • DARKSLATEBLUE = Color(UInt8(72), UInt8(61), UInt8(139), UInt8(255))
  • DARKSLATEGRAY = Color(UInt8(47), UInt8(79), UInt8(79), UInt8(255))
  • DARKSLATEGREY = Color(UInt8(47), UInt8(79), UInt8(79), UInt8(255))
  • DARKTURQUOISE = Color(UInt8(0), UInt8(206), UInt8(209), UInt8(255))
  • DARKVIOLET = Color(UInt8(148), UInt8(0), UInt8(211), UInt8(255))
  • DEEPPINK = Color(UInt8(255), UInt8(20), UInt8(147), UInt8(255))
  • DEEPSKYBLUE = Color(UInt8(0), UInt8(191), UInt8(255), UInt8(255))
  • DIMGRAY = Color(UInt8(105), UInt8(105), UInt8(105), UInt8(255))
  • DIMGREY = Color(UInt8(105), UInt8(105), UInt8(105), UInt8(255))
  • DODGERBLUE = Color(UInt8(30), UInt8(144), UInt8(255), UInt8(255))
  • FIREBRICK = Color(UInt8(178), UInt8(34), UInt8(34), UInt8(255))
  • FLORALWHITE = Color(UInt8(255), UInt8(250), UInt8(240), UInt8(255))
  • FORESTGREEN = Color(UInt8(34), UInt8(139), UInt8(34), UInt8(255))
  • FUCHSIA = Color(UInt8(255), UInt8(0), UInt8(255), UInt8(255))
  • GAINSBORO = Color(UInt8(220), UInt8(220), UInt8(220), UInt8(255))
  • GHOSTWHITE = Color(UInt8(248), UInt8(248), UInt8(255), UInt8(255))
  • GOLD = Color(UInt8(255), UInt8(215), UInt8(0), UInt8(255))
  • GOLDENROD = Color(UInt8(218), UInt8(165), UInt8(32), UInt8(255))
  • GRAY = Color(UInt8(128), UInt8(128), UInt8(128), UInt8(255))
  • GREEN = Color(UInt8(0), UInt8(128), UInt8(0), UInt8(255))
  • GREENYELLOW = Color(UInt8(173), UInt8(255), UInt8(47), UInt8(255))
  • GREY = Color(UInt8(128), UInt8(128), UInt8(128), UInt8(255))
  • HONEYDEW = Color(UInt8(240), UInt8(255), UInt8(240), UInt8(255))
  • HOTPINK = Color(UInt8(255), UInt8(105), UInt8(180), UInt8(255))
  • INDIANRED = Color(UInt8(205), UInt8(92), UInt8(92), UInt8(255))
  • INDIGO = Color(UInt8(75), UInt8(0), UInt8(130), UInt8(255))
  • IVORY = Color(UInt8(255), UInt8(255), UInt8(240), UInt8(255))
  • KHAKI = Color(UInt8(240), UInt8(230), UInt8(140), UInt8(255))
  • LAVENDER = Color(UInt8(230), UInt8(230), UInt8(250), UInt8(255))
  • LAVENDERBLUSH = Color(UInt8(255), UInt8(240), UInt8(245), UInt8(255))
  • LAWNGREEN = Color(UInt8(124), UInt8(252), UInt8(0), UInt8(255))
  • LEMONCHIFFON = Color(UInt8(255), UInt8(250), UInt8(205), UInt8(255))
  • LIGHTBLUE = Color(UInt8(173), UInt8(216), UInt8(230), UInt8(255))
  • LIGHTCORAL = Color(UInt8(240), UInt8(128), UInt8(128), UInt8(255))
  • LIGHTCYAN = Color(UInt8(224), UInt8(255), UInt8(255), UInt8(255))
  • LIGHTGOLDENRODYELLOW = Color(UInt8(250), UInt8(250), UInt8(210), UInt8(255))
  • LIGHTGRAY = Color(UInt8(211), UInt8(211), UInt8(211), UInt8(255))
  • LIGHTGREEN = Color(UInt8(144), UInt8(238), UInt8(144), UInt8(255))
  • LIGHTGREY = Color(UInt8(211), UInt8(211), UInt8(211), UInt8(255))
  • LIGHTPINK = Color(UInt8(255), UInt8(182), UInt8(193), UInt8(255))
  • LIGHTSALMON = Color(UInt8(255), UInt8(160), UInt8(122), UInt8(255))
  • LIGHTSEAGREEN = Color(UInt8(32), UInt8(178), UInt8(170), UInt8(255))
  • LIGHTSKYBLUE = Color(UInt8(135), UInt8(206), UInt8(250), UInt8(255))
  • LIGHTSLATEGRAY = Color(UInt8(119), UInt8(136), UInt8(153), UInt8(255))
  • LIGHTSLATEGREY = Color(UInt8(119), UInt8(136), UInt8(153), UInt8(255))
  • LIGHTSTEELBLUE = Color(UInt8(176), UInt8(196), UInt8(222), UInt8(255))
  • LIGHTYELLOW = Color(UInt8(255), UInt8(255), UInt8(224), UInt8(255))
  • LIME = Color(UInt8(0), UInt8(255), UInt8(0), UInt8(255))
  • LIMEGREEN = Color(UInt8(50), UInt8(205), UInt8(50), UInt8(255))
  • LINEN = Color(UInt8(250), UInt8(240), UInt8(230), UInt8(255))
  • MAGENTA = Color(UInt8(255), UInt8(0), UInt8(255), UInt8(255))
  • MAROON = Color(UInt8(128), UInt8(0), UInt8(0), UInt8(255))
  • MEDIUMAQUAMARINE = Color(UInt8(102), UInt8(205), UInt8(170), UInt8(255))
  • MEDIUMBLUE = Color(UInt8(0), UInt8(0), UInt8(205), UInt8(255))
  • MEDIUMORCHID = Color(UInt8(186), UInt8(85), UInt8(211), UInt8(255))
  • MEDIUMPURPLE = Color(UInt8(147), UInt8(112), UInt8(219), UInt8(255))
  • MEDIUMSEAGREEN = Color(UInt8(60), UInt8(179), UInt8(113), UInt8(255))
  • MEDIUMSLATEBLUE = Color(UInt8(123), UInt8(104), UInt8(238), UInt8(255))
  • MEDIUMSPRINGGREEN = Color(UInt8(0), UInt8(250), UInt8(154), UInt8(255))
  • MEDIUMTURQUOISE = Color(UInt8(72), UInt8(209), UInt8(204), UInt8(255))
  • MEDIUMVIOLETRED = Color(UInt8(199), UInt8(21), UInt8(133), UInt8(255))
  • MIDNIGHTBLUE = Color(UInt8(25), UInt8(25), UInt8(112), UInt8(255))
  • MINTCREAM = Color(UInt8(245), UInt8(255), UInt8(250), UInt8(255))
  • MISTYROSE = Color(UInt8(255), UInt8(228), UInt8(225), UInt8(255))
  • MOCCASIN = Color(UInt8(255), UInt8(228), UInt8(181), UInt8(255))
  • NAVAJOWHITE = Color(UInt8(255), UInt8(222), UInt8(173), UInt8(255))
  • NAVY = Color(UInt8(0), UInt8(0), UInt8(128), UInt8(255))
  • OLDLACE = Color(UInt8(253), UInt8(245), UInt8(230), UInt8(255))
  • OLIVE = Color(UInt8(128), UInt8(128), UInt8(0), UInt8(255))
  • OLIVEDRAB = Color(UInt8(107), UInt8(142), UInt8(35), UInt8(255))
  • ORANGE = Color(UInt8(255), UInt8(165), UInt8(0), UInt8(255))
  • ORANGERED = Color(UInt8(255), UInt8(69), UInt8(0), UInt8(255))
  • ORCHID = Color(UInt8(218), UInt8(112), UInt8(214), UInt8(255))
  • PALEGOLDENROD = Color(UInt8(238), UInt8(232), UInt8(170), UInt8(255))
  • PALEGREEN = Color(UInt8(152), UInt8(251), UInt8(152), UInt8(255))
  • PALETURQUOISE = Color(UInt8(175), UInt8(238), UInt8(238), UInt8(255))
  • PALEVIOLETRED = Color(UInt8(219), UInt8(112), UInt8(147), UInt8(255))
  • PAPAYAWHIP = Color(UInt8(255), UInt8(239), UInt8(213), UInt8(255))
  • PEACHPUFF = Color(UInt8(255), UInt8(218), UInt8(185), UInt8(255))
  • PERU = Color(UInt8(205), UInt8(133), UInt8(63), UInt8(255))
  • PINK = Color(UInt8(255), UInt8(192), UInt8(203), UInt8(255))
  • PLUM = Color(UInt8(221), UInt8(160), UInt8(221), UInt8(255))
  • POWDERBLUE = Color(UInt8(176), UInt8(224), UInt8(230), UInt8(255))
  • PURPLE = Color(UInt8(128), UInt8(0), UInt8(128), UInt8(255))
  • REBECCAPURPLE = Color(UInt8(102), UInt8(51), UInt8(153), UInt8(255))
  • RED = Color(UInt8(255), UInt8(0), UInt8(0), UInt8(255))
  • ROSYBROWN = Color(UInt8(188), UInt8(143), UInt8(143), UInt8(255))
  • ROYALBLUE = Color(UInt8(65), UInt8(105), UInt8(225), UInt8(255))
  • SADDLEBROWN = Color(UInt8(139), UInt8(69), UInt8(19), UInt8(255))
  • SALMON = Color(UInt8(250), UInt8(128), UInt8(114), UInt8(255))
  • SANDYBROWN = Color(UInt8(244), UInt8(164), UInt8(96), UInt8(255))
  • SEAGREEN = Color(UInt8(46), UInt8(139), UInt8(87), UInt8(255))
  • SEASHELL = Color(UInt8(255), UInt8(245), UInt8(238), UInt8(255))
  • SIENNA = Color(UInt8(160), UInt8(82), UInt8(45), UInt8(255))
  • SILVER = Color(UInt8(192), UInt8(192), UInt8(192), UInt8(255))
  • SKYBLUE = Color(UInt8(135), UInt8(206), UInt8(235), UInt8(255))
  • SLATEBLUE = Color(UInt8(106), UInt8(90), UInt8(205), UInt8(255))
  • SLATEGRAY = Color(UInt8(112), UInt8(128), UInt8(144), UInt8(255))
  • SLATEGREY = Color(UInt8(112), UInt8(128), UInt8(144), UInt8(255))
  • SNOW = Color(UInt8(255), UInt8(250), UInt8(250), UInt8(255))
  • SPRINGGREEN = Color(UInt8(0), UInt8(255), UInt8(127), UInt8(255))
  • STEELBLUE = Color(UInt8(70), UInt8(130), UInt8(180), UInt8(255))
  • TAN = Color(UInt8(210), UInt8(180), UInt8(140), UInt8(255))
  • TEAL = Color(UInt8(0), UInt8(128), UInt8(128), UInt8(255))
  • THISTLE = Color(UInt8(216), UInt8(191), UInt8(216), UInt8(255))
  • TOMATO = Color(UInt8(255), UInt8(99), UInt8(71), UInt8(255))
  • TURQUOISE = Color(UInt8(64), UInt8(224), UInt8(208), UInt8(255))
  • VIOLET = Color(UInt8(238), UInt8(130), UInt8(238), UInt8(255))
  • WHEAT = Color(UInt8(245), UInt8(222), UInt8(179), UInt8(255))
  • WHITE = Color(UInt8(255), UInt8(255), UInt8(255), UInt8(255))
  • WHITESMOKE = Color(UInt8(245), UInt8(245), UInt8(245), UInt8(255))
  • YELLOW = Color(UInt8(255), UInt8(255), UInt8(0), UInt8(255))
  • YELLOWGREEN = Color(UInt8(154), UInt8(205), UInt8(50), UInt8(255))