On this page:
3.18.1 Data types
Color
color
3.18.2 Predefined colors

3.18 color

Usage:
include color
import color as ...

3.18.1 Data types

data Color:
| color(red :: Number, green :: Number, blue :: Number, alpha :: Number)
end

color :: (
red :: Number,
green :: Number,
blue :: Number,
alpha :: Number
)
-> Color

The values for red, green, and blue should be in the range 0–255, inclusive. The values for alpha should be in the range 0–1, and indicates how transparent the color is, with 0 as fully transparent and 1 as fully opaque.

3.18.2 Predefined colors

The following colors are predefined constants:
  • orange: abc123 abc123

  • red: abc123 abc123

  • orange-red: abc123 abc123

  • tomato: abc123 abc123

  • dark-red: abc123 abc123

  • fire-brick: abc123 abc123

  • crimson: abc123 abc123

  • deep-pink: abc123 abc123

  • maroon: abc123 abc123

  • indian-red: abc123 abc123

  • medium-violet-red: abc123 abc123

  • violet-red: abc123 abc123

  • light-coral: abc123 abc123

  • hot-pink: abc123 abc123

  • pale-violet-red: abc123 abc123

  • light-pink: abc123 abc123

  • rosy-brown: abc123 abc123

  • pink: abc123 abc123

  • orchid: abc123 abc123

  • lavender-blush: abc123 abc123

  • snow: abc123 abc123

  • chocolate: abc123 abc123

  • saddle-brown: abc123 abc123

  • brown: abc123 abc123

  • dark-orange: abc123 abc123

  • coral: abc123 abc123

  • sienna: abc123 abc123

  • salmon: abc123 abc123

  • peru: abc123 abc123

  • dark-goldenrod: abc123 abc123

  • goldenrod: abc123 abc123

  • sandy-brown: abc123 abc123

  • light-salmon: abc123 abc123

  • dark-salmon: abc123 abc123

  • gold: abc123 abc123

  • yellow: abc123 abc123

  • olive: abc123 abc123

  • burlywood: abc123 abc123

  • tan: abc123 abc123

  • navajo-white: abc123 abc123

  • peach-puff: abc123 abc123

  • khaki: abc123 abc123

  • dark-khaki: abc123 abc123

  • moccasin: abc123 abc123

  • wheat: abc123 abc123

  • bisque: abc123 abc123

  • pale-goldenrod: abc123 abc123

  • blanched-almond: abc123 abc123

  • medium-goldenrod: abc123 abc123

  • papaya-whip: abc123 abc123

  • misty-rose: abc123 abc123

  • lemon-chiffon: abc123 abc123

  • antique-white: abc123 abc123

  • cornsilk: abc123 abc123

  • light-goldenrod-yellow: abc123 abc123

  • old-lace: abc123 abc123

  • linen: abc123 abc123

  • light-yellow: abc123 abc123

  • seashell: abc123 abc123

  • beige: abc123 abc123

  • floral-white: abc123 abc123

  • ivory: abc123 abc123

  • green: abc123 abc123

  • lawn-green: abc123 abc123

  • chartreuse: abc123 abc123

  • green-yellow: abc123 abc123

  • yellow-green: abc123 abc123

  • medium-forest-green: abc123 abc123

  • olive-drab: abc123 abc123

  • dark-olive-green: abc123 abc123

  • dark-sea-green: abc123 abc123

  • lime: abc123 abc123

  • dark-green: abc123 abc123

  • lime-green: abc123 abc123

  • forest-green: abc123 abc123

  • spring-green: abc123 abc123

  • medium-spring-green: abc123 abc123

  • sea-green: abc123 abc123

  • medium-sea-green: abc123 abc123

  • aquamarine: abc123 abc123

  • light-green: abc123 abc123

  • pale-green: abc123 abc123

  • medium-aquamarine: abc123 abc123

  • turquoise: abc123 abc123

  • light-sea-green: abc123 abc123

  • medium-turquoise: abc123 abc123

  • honeydew: abc123 abc123

  • mint-cream: abc123 abc123

  • royal-blue: abc123 abc123

  • dodger-blue: abc123 abc123

  • deep-sky-blue: abc123 abc123

  • cornflower-blue: abc123 abc123

  • steel-blue: abc123 abc123

  • light-sky-blue: abc123 abc123

  • dark-turquoise: abc123 abc123

  • cyan: abc123 abc123

  • aqua: abc123 abc123

  • dark-cyan: abc123 abc123

  • teal: abc123 abc123

  • sky-blue: abc123 abc123

  • cadet-blue: abc123 abc123

  • dark-slate-gray: abc123 abc123

  • dark-slate-grey: abc123 abc123

  • light-slate-gray: abc123 abc123

  • light-slate-grey: abc123 abc123

  • slate-gray: abc123 abc123

  • slate-grey: abc123 abc123

  • light-steel-blue: abc123 abc123

  • light-blue: abc123 abc123

  • powder-blue: abc123 abc123

  • pale-turquoise: abc123 abc123

  • light-cyan: abc123 abc123

  • alice-blue: abc123 abc123

  • azure: abc123 abc123

  • medium-blue: abc123 abc123

  • dark-blue: abc123 abc123

  • midnight-blue: abc123 abc123

  • navy: abc123 abc123

  • blue: abc123 abc123

  • indigo: abc123 abc123

  • blue-violet: abc123 abc123

  • medium-slate-blue: abc123 abc123

  • slate-blue: abc123 abc123

  • purple: abc123 abc123

  • dark-slate-blue: abc123 abc123

  • dark-violet: abc123 abc123

  • dark-orchid: abc123 abc123

  • medium-purple: abc123 abc123

  • medium-orchid: abc123 abc123

  • magenta: abc123 abc123

  • fuchsia: abc123 abc123

  • dark-magenta: abc123 abc123

  • violet: abc123 abc123

  • plum: abc123 abc123

  • lavender: abc123 abc123

  • thistle: abc123 abc123

  • ghost-white: abc123 abc123

  • white: abc123 abc123

  • white-smoke: abc123 abc123

  • gainsboro: abc123 abc123

  • light-gray: abc123 abc123

  • light-grey: abc123 abc123

  • silver: abc123 abc123

  • gray: abc123 abc123

  • grey: abc123 abc123

  • dark-gray: abc123 abc123

  • dark-grey: abc123 abc123

  • dim-gray: abc123 abc123

  • dim-grey: abc123 abc123

  • black: abc123 abc123

  • transparent: abc123 abc123