Skip to content

Colour Names

The machine shows 256 colours: three bits of red, three of green, two of blue, packed into one byte (RGB332). Anywhere a colour is asked for you can write that byte — 0x1F — but most of them have a name as well, and a name is what keeps a file a person edits a file a person can read.

The names are the web's, mapped onto the 256 this machine has. Mapping them collapses some (a 3-3-2 grid cannot tell ivory from snow), so the list comes in two parts: 78 names, one per distinct colour, and 23 further spellings that land on a colour already in the list. Both are understood; the 78 are what a picker offers back, and what a file is written with.

The 78

The swatches are the colour as the machine expands it, so a name that looks approximate here looks the same on the screen.

black
0x00
white
0xFF
red
0xE0
lime
0x1C
blue
0x03
yellow
0xFC
cyan
0x1F
magenta
0xE3
silver
0xB6
gray
0x92
maroon
0x80
olive
0x90
green
0x10
purple
0x82
teal
0x12
navy
0x02
orange
0xF4
gold
0xF8
pink
0xF6
hotpink
0xEE
deeppink
0xE6
crimson
0xC5
firebrick
0xA4
tomato
0xED
salmon
0xF1
orangered
0xE8
darkorange
0xF0
khaki
0xFA
tan
0xD6
peru
0xD1
chocolate
0xCC
saddlebrown
0x88
sienna
0x89
darkkhaki
0xB5
yellowgreen
0x99
olivedrab
0x70
greenyellow
0xBD
chartreuse
0x7C
springgreen
0x1D
limegreen
0x39
forestgreen
0x30
darkgreen
0x0C
seagreen
0x31
mediumseagreen
0x55
lightgreen
0x9E
darkseagreen
0x96
aquamarine
0x7E
turquoise
0x5A
darkturquoise
0x1A
lightseagreen
0x36
lightcyan
0xDF
paleturquoise
0xBF
powderblue
0xBB
skyblue
0x9B
deepskyblue
0x17
dodgerblue
0x33
cornflowerblue
0x73
steelblue
0x52
royalblue
0x4F
midnightblue
0x25
slateblue
0x6A
mediumpurple
0x8F
blueviolet
0x87
darkorchid
0x86
mediumorchid
0xAA
orchid
0xCF
violet
0xF3
plum
0xD3
thistle
0xD7
lavender
0xDB
indigo
0x42
mediumvioletred
0xA6
palevioletred
0xCE
mistyrose
0xFB
lightgray
0xDA
dimgray
0x6D
lightslategray
0x72
darkslategray
0x29

Also understood

Written in a file or typed at the shell, each of these is accepted and resolves to the colour beside it. Ask for the name back and you get that one.

Also understood Lands on
darkred maroon 0x80
coral tomato 0xED
lightyellow white 0xFF
ivory white 0xFF
beige white 0xFF
wheat khaki 0xFA
brown firebrick 0xA4
lawngreen chartreuse 0x7C
palegreen lightgreen 0x9E
darkcyan teal 0x12
mediumblue navy 0x02
darkblue navy 0x02
darkviolet purple 0x82
darkmagenta purple 0x82
lightpink pink 0xF6
darkgray silver 0xB6
slategray lightslategray 0x72
gainsboro lavender 0xDB
whitesmoke white 0xFF
snow white 0xFF
azure white 0xFF
honeydew white 0xFF
linen white 0xFF

Where a name works

/home/colors.toml bg = "midnightblue"
The shell's color command color bg skyblue, and color names lists the 78
The editor's Colors dialog It writes the same file
An app, through FmrbColors Below

From an app (FmrbColors)

Method
FmrbColors.by_name("skyblue") The value, or nil when it is not one of ours
FmrbColors.to_color(str) The same, but "0x1F" and "31" are accepted too
FmrbColors.to_text(value) Its name, or "0x1F" when it has none. This is what gets written to a file
FmrbColors.name_of(value) Its name, or nil
FmrbColors.palette_size / name_at(i) / palette_value(i) Walking the 78, which is how a picker is built
FmrbColors.shade(colour, avoid = nil) A step darker, or lighter when darker would land on avoid or on the colour itself. The editor's bars are made this way
FmrbColors.section("editor") That section of the user's colours file, as a Hash

A name that is not one of ours gives nil rather than a colour. That is deliberate: a typo in a colours file leaves the theme colour in place instead of painting the app black.