Toolman 100% local

Color codes

The two lists colours are usually looked up in — the CSS keywords and the default Tailwind palette — with hex, RGB and the contrast ratio that decides whether text can sit on each one. For a colour on neither list, use the color converter.

What a contrast ratio is, and the four numbers worth knowing

Contrast is the ratio between the light two colours reflect, and it runs from 1:1 for two identical colours to 21:1 for black on white — that is the ceiling, and nothing beats it. Four points on that scale carry rules:

RatioPassesFor
3:1WCAG AALarge text — 18.5px bold or 24px regular and up — and the edges of buttons and inputs
4.5:1WCAG AABody text, which is the threshold most designs are judged against
7:1WCAG AAABody text where the standard is stricter, such as public-sector sites in some jurisdictions
21:1—Black on white. There is nothing higher.

The ratio is symmetrical, and that catches people out. A colour at 4.5:1 against white is the same 4.5:1 whether the colour is the ink or the background — there is one pair and one number, so a palette cannot pass one way and fail the other.

What is not symmetrical is how it reads. Light text on a dark ground appears to bleed outward at the edges, an effect called halation, which thins the apparent stroke and hurts small or light weights more than the same contrast does the other way round. The ratio says the combination is allowed; it does not say the two directions look alike, and a caption that works as dark ink often wants a heavier weight when it is reversed out.

Reading a hex code

A hex colour is three bytes written in base 16: #RRGGBB, each pair from 00 to FF, which is 0 to 255. #FF0000 is red at full strength with no green and no blue. The three-digit form #F00 is the same colour — each digit is doubled, so #ABC means #AABBCC — which is why only colours whose pairs happen to repeat can be written short.

That also explains a thing people notice and mistrust: there are 16,777,216 hex colours, and the shorthand reaches only 4,096 of them.

Why the same hex looks different on two screens

A hex code is not a colour, it is an instruction to a display, and the display decides what to do with it. The web assumes sRGB unless told otherwise; a wide-gamut monitor showing the same numbers without colour management renders them more saturated, and a phone in a warm night mode shifts them again.

Nothing on this site can fix that, and it is worth knowing before spending an afternoon matching a screen to a print sample. For print, a CMYK figure from any converter is a conversion and not a proof — the printer's own profile is the only authority on what will come off the press.

CSS named colours

The 141 CSS colour keywords. CSS also accepts a grey spelling wherever a name contains gray — darkgrey, slategrey and the rest — which are the same colours and are not listed twice. The list was settled in CSS 2.1 and has been added to once since, when rebeccapurple was standardised in 2014. 2 pairs of names are the same colour: aqua and cyan are both #00FFFF, and fuchsia and magenta both #FF00FF.

NameHexRGBHSLOn whiteOn blackText on it
aliceblue#F0F8FF240, 248, 255208°, 100%, 97%1.07:119.58:1black
antiquewhite#FAEBD7250, 235, 21534°, 78%, 91%1.17:117.93:1black
aqua#00FFFF0, 255, 255180°, 100%, 50%1.25:116.75:1black
aquamarine#7FFFD4127, 255, 212160°, 100%, 75%1.22:117.16:1black
azure#F0FFFF240, 255, 255180°, 100%, 97%1.03:120.45:1black
beige#F5F5DC245, 245, 22060°, 56%, 91%1.11:118.98:1black
bisque#FFE4C4255, 228, 19633°, 100%, 88%1.22:117.15:1black
black#0000000, 0, 00°, 0%, 0%21.00:11.00:1white
blanchedalmond#FFEBCD255, 235, 20536°, 100%, 90%1.17:118.02:1black
blue#0000FF0, 0, 255240°, 100%, 50%8.59:12.44:1white
blueviolet#8A2BE2138, 43, 226271°, 76%, 53%5.96:13.52:1white
brown#A52A2A165, 42, 420°, 59%, 41%7.08:12.96:1white
burlywood#DEB887222, 184, 13534°, 57%, 70%1.86:111.31:1black
cadetblue#5F9EA095, 158, 160182°, 25%, 50%3.05:16.88:1black
chartreuse#7FFF00127, 255, 090°, 100%, 50%1.30:116.21:1black
chocolate#D2691E210, 105, 3025°, 75%, 47%3.63:15.78:1black
coral#FF7F50255, 127, 8016°, 100%, 66%2.50:18.40:1black
cornflowerblue#6495ED100, 149, 237219°, 79%, 66%2.97:17.06:1black
cornsilk#FFF8DC255, 248, 22048°, 100%, 93%1.07:119.71:1black
crimson#DC143C220, 20, 60348°, 83%, 47%4.99:14.21:1white
cyan#00FFFF0, 255, 255180°, 100%, 50%1.25:116.75:1black
darkblue#00008B0, 0, 139240°, 100%, 27%15.30:11.37:1white
darkcyan#008B8B0, 139, 139180°, 100%, 27%4.15:15.07:1black
darkgoldenrod#B8860B184, 134, 1143°, 89%, 38%3.25:16.45:1black
darkgray#A9A9A9169, 169, 1690°, 0%, 66%2.35:18.94:1black
darkgreen#0064000, 100, 0120°, 100%, 20%7.44:12.82:1white
darkkhaki#BDB76B189, 183, 10756°, 38%, 58%2.07:110.15:1black
darkmagenta#8B008B139, 0, 139300°, 100%, 27%8.50:12.47:1white
darkolivegreen#556B2F85, 107, 4782°, 39%, 30%5.95:13.53:1white
darkorange#FF8C00255, 140, 033°, 100%, 50%2.33:19.00:1black
darkorchid#9932CC153, 50, 204280°, 61%, 50%5.70:13.68:1white
darkred#8B0000139, 0, 00°, 100%, 27%10.01:12.10:1white
darksalmon#E9967A233, 150, 12215°, 72%, 70%2.31:19.11:1black
darkseagreen#8FBC8F143, 188, 143120°, 25%, 65%2.15:19.76:1black
darkslateblue#483D8B72, 61, 139248°, 39%, 39%9.07:12.32:1white
darkslategray#2F4F4F47, 79, 79180°, 25%, 25%8.93:12.35:1white
darkturquoise#00CED10, 206, 209181°, 100%, 41%1.95:110.75:1black
darkviolet#9400D3148, 0, 211282°, 100%, 41%6.56:13.20:1white
deeppink#FF1493255, 20, 147328°, 100%, 54%3.64:15.77:1black
deepskyblue#00BFFF0, 191, 255195°, 100%, 50%2.12:19.90:1black
dimgray#696969105, 105, 1050°, 0%, 41%5.49:13.83:1white
dodgerblue#1E90FF30, 144, 255210°, 100%, 56%3.24:16.49:1black
firebrick#B22222178, 34, 340°, 68%, 42%6.68:13.14:1white
floralwhite#FFFAF0255, 250, 24040°, 100%, 97%1.04:120.18:1black
forestgreen#228B2234, 139, 34120°, 61%, 34%4.39:14.78:1black
fuchsia#FF00FF255, 0, 255300°, 100%, 50%3.14:16.70:1black
gainsboro#DCDCDC220, 220, 2200°, 0%, 86%1.37:115.31:1black
ghostwhite#F8F8FF248, 248, 255240°, 100%, 99%1.06:119.86:1black
gold#FFD700255, 215, 051°, 100%, 50%1.40:114.97:1black
goldenrod#DAA520218, 165, 3243°, 74%, 49%2.24:19.38:1black
gray#808080128, 128, 1280°, 0%, 50%3.95:15.32:1black
green#0080000, 128, 0120°, 100%, 25%5.14:14.09:1white
greenyellow#ADFF2F173, 255, 4784°, 100%, 59%1.23:117.12:1black
honeydew#F0FFF0240, 255, 240120°, 100%, 97%1.04:120.27:1black
hotpink#FF69B4255, 105, 180330°, 100%, 71%2.65:17.93:1black
indianred#CD5C5C205, 92, 920°, 53%, 58%3.98:15.28:1black
indigo#4B008275, 0, 130275°, 100%, 25%12.95:11.62:1white
ivory#FFFFF0255, 255, 24060°, 100%, 97%1.01:120.81:1black
khaki#F0E68C240, 230, 14054°, 77%, 75%1.28:116.40:1black
lavender#E6E6FA230, 230, 250240°, 67%, 94%1.23:117.06:1black
lavenderblush#FFF0F5255, 240, 245340°, 100%, 97%1.10:119.03:1black
lawngreen#7CFC00124, 252, 090°, 100%, 49%1.33:115.78:1black
lemonchiffon#FFFACD255, 250, 20554°, 100%, 90%1.06:119.81:1black
lightblue#ADD8E6173, 216, 230195°, 53%, 79%1.53:113.74:1black
lightcoral#F08080240, 128, 1280°, 79%, 72%2.59:18.10:1black
lightcyan#E0FFFF224, 255, 255180°, 100%, 94%1.05:119.92:1black
lightgoldenrodyellow#FAFAD2250, 250, 21060°, 80%, 90%1.07:119.67:1black
lightgray#D3D3D3211, 211, 2110°, 0%, 83%1.50:114.03:1black
lightgreen#90EE90144, 238, 144120°, 73%, 75%1.42:114.82:1black
lightpink#FFB6C1255, 182, 193351°, 100%, 86%1.65:112.71:1black
lightsalmon#FFA07A255, 160, 12217°, 100%, 74%1.99:110.56:1black
lightseagreen#20B2AA32, 178, 170177°, 70%, 41%2.62:18.01:1black
lightskyblue#87CEFA135, 206, 250203°, 92%, 75%1.72:112.24:1black
lightslategray#778899119, 136, 153210°, 14%, 53%3.64:15.77:1black
lightsteelblue#B0C4DE176, 196, 222214°, 41%, 78%1.78:111.80:1black
lightyellow#FFFFE0255, 255, 22460°, 100%, 94%1.02:120.63:1black
lime#00FF000, 255, 0120°, 100%, 50%1.37:115.30:1black
limegreen#32CD3250, 205, 50120°, 61%, 50%2.12:19.91:1black
linen#FAF0E6250, 240, 23030°, 67%, 94%1.12:118.67:1black
magenta#FF00FF255, 0, 255300°, 100%, 50%3.14:16.70:1black
maroon#800000128, 0, 00°, 100%, 25%10.95:11.92:1white
mediumaquamarine#66CDAA102, 205, 170160°, 51%, 60%1.93:110.88:1black
mediumblue#0000CD0, 0, 205240°, 100%, 40%11.16:11.88:1white
mediumorchid#BA55D3186, 85, 211288°, 59%, 58%3.94:15.33:1black
mediumpurple#9370DB147, 112, 219260°, 60%, 65%3.76:15.58:1black
mediumseagreen#3CB37160, 179, 113147°, 50%, 47%2.67:17.88:1black
mediumslateblue#7B68EE123, 104, 238249°, 80%, 67%4.15:15.06:1black
mediumspringgreen#00FA9A0, 250, 154157°, 100%, 49%1.39:115.14:1black
mediumturquoise#48D1CC72, 209, 204178°, 60%, 55%1.86:111.27:1black
mediumvioletred#C71585199, 21, 133322°, 81%, 43%5.42:13.87:1white
midnightblue#19197025, 25, 112240°, 64%, 27%14.85:11.41:1white
mintcream#F5FFFA245, 255, 250150°, 100%, 98%1.02:120.57:1black
mistyrose#FFE4E1255, 228, 2256°, 100%, 94%1.20:117.44:1black
moccasin#FFE4B5255, 228, 18138°, 100%, 85%1.23:117.02:1black
navajowhite#FFDEAD255, 222, 17336°, 100%, 84%1.29:116.30:1black
navy#0000800, 0, 128240°, 100%, 25%16.01:11.31:1white
oldlace#FDF5E6253, 245, 23039°, 85%, 95%1.08:119.38:1black
olive#808000128, 128, 060°, 100%, 25%4.20:15.01:1black
olivedrab#6B8E23107, 142, 3580°, 60%, 35%3.81:15.52:1black
orange#FFA500255, 165, 039°, 100%, 50%1.97:110.63:1black
orangered#FF4500255, 69, 016°, 100%, 50%3.44:16.10:1black
orchid#DA70D6218, 112, 214302°, 59%, 65%2.89:17.27:1black
palegoldenrod#EEE8AA238, 232, 17055°, 67%, 80%1.25:116.76:1black
palegreen#98FB98152, 251, 152120°, 93%, 79%1.27:116.59:1black
paleturquoise#AFEEEE175, 238, 238180°, 65%, 81%1.29:116.29:1black
palevioletred#DB7093219, 112, 147340°, 60%, 65%3.11:16.75:1black
papayawhip#FFEFD5255, 239, 21337°, 100%, 92%1.13:118.56:1black
peachpuff#FFDAB9255, 218, 18528°, 100%, 86%1.31:115.98:1black
peru#CD853F205, 133, 6330°, 59%, 53%2.99:17.02:1black
pink#FFC0CB255, 192, 203350°, 100%, 88%1.54:113.65:1black
plum#DDA0DD221, 160, 221300°, 47%, 75%2.07:110.15:1black
powderblue#B0E0E6176, 224, 230187°, 52%, 80%1.43:114.65:1black
purple#800080128, 0, 128300°, 100%, 25%9.42:12.23:1white
rebeccapurple#663399102, 51, 153270°, 50%, 40%8.41:12.50:1white
red#FF0000255, 0, 00°, 100%, 50%4.00:15.25:1black
rosybrown#BC8F8F188, 143, 1430°, 25%, 65%2.81:17.46:1black
royalblue#4169E165, 105, 225225°, 73%, 57%4.85:14.33:1white
saddlebrown#8B4513139, 69, 1925°, 76%, 31%7.10:12.96:1white
salmon#FA8072250, 128, 1146°, 93%, 71%2.50:18.40:1black
sandybrown#F4A460244, 164, 9628°, 87%, 67%2.03:110.33:1black
seagreen#2E8B5746, 139, 87146°, 50%, 36%4.25:14.95:1black
seashell#FFF5EE255, 245, 23825°, 100%, 97%1.07:119.55:1black
sienna#A0522D160, 82, 4519°, 56%, 40%5.62:13.74:1white
silver#C0C0C0192, 192, 1920°, 0%, 75%1.82:111.54:1black
skyblue#87CEEB135, 206, 235197°, 71%, 73%1.74:112.06:1black
slateblue#6A5ACD106, 90, 205248°, 53%, 58%5.31:13.96:1white
slategray#708090112, 128, 144210°, 13%, 50%4.05:15.18:1black
snow#FFFAFA255, 250, 2500°, 100%, 99%1.03:120.31:1black
springgreen#00FF7F0, 255, 127150°, 100%, 50%1.35:115.61:1black
steelblue#4682B470, 130, 180207°, 44%, 49%4.11:15.11:1black
tan#D2B48C210, 180, 14034°, 44%, 69%1.97:110.65:1black
teal#0080800, 128, 128180°, 100%, 25%4.77:14.40:1white
thistle#D8BFD8216, 191, 216300°, 24%, 80%1.70:112.36:1black
tomato#FF6347255, 99, 719°, 100%, 64%2.95:17.13:1black
turquoise#40E0D064, 224, 208174°, 72%, 56%1.64:112.79:1black
violet#EE82EE238, 130, 238300°, 76%, 72%2.32:19.06:1black
wheat#F5DEB3245, 222, 17939°, 77%, 83%1.31:115.98:1black
white#FFFFFF255, 255, 2550°, 0%, 100%1.00:121.00:1black
whitesmoke#F5F5F5245, 245, 2450°, 0%, 96%1.09:119.26:1black
yellow#FFFF00255, 255, 060°, 100%, 50%1.07:119.56:1black
yellowgreen#9ACD32154, 205, 5080°, 61%, 50%1.88:111.15:1black

"On white" and "on black" are WCAG 2.1 contrast ratios. Body text needs 4.5:1 and large text 3:1. "Text on it" is whichever of white and black reads better on the colour as a background.

The Tailwind CSS palette

The default palette of tailwindcss@3.4.17: 22 hues, eleven shades each, read from the package rather than transcribed. Shades in bold pass WCAG AA as text on a white page; the rest are for backgrounds, borders and large type.

Hue50100200300400500600700800900950
gray
f9fafb

f3f4f6

e5e7eb

d1d5db

9ca3af

6b7280

4b5563

374151

1f2937

111827

030712
green
f0fdf4

dcfce7

bbf7d0

86efac

4ade80

22c55e

16a34a

15803d

166534

14532d

052e16
neutral
fafafa

f5f5f5

e5e5e5

d4d4d4

a3a3a3

737373

525252

404040

262626

171717

0a0a0a
blue
eff6ff

dbeafe

bfdbfe

93c5fd

60a5fa

3b82f6

2563eb

1d4ed8

1e40af

1e3a8a

172554
stone
fafaf9

f5f5f4

e7e5e4

d6d3d1

a8a29e

78716c

57534e

44403c

292524

1c1917

0c0a09
slate
f8fafc

f1f5f9

e2e8f0

cbd5e1

94a3b8

64748b

475569

334155

1e293b

0f172a

020617
lime
f7fee7

ecfccb

d9f99d

bef264

a3e635

84cc16

65a30d

4d7c0f

3f6212

365314

1a2e05
yellow
fefce8

fef9c3

fef08a

fde047

facc15

eab308

ca8a04

a16207

854d0e

713f12

422006
orange
fff7ed

ffedd5

fed7aa

fdba74

fb923c

f97316

ea580c

c2410c

9a3412

7c2d12

431407
pink
fdf2f8

fce7f3

fbcfe8

f9a8d4

f472b6

ec4899

db2777

be185d

9d174d

831843

500724
rose
fff1f2

ffe4e6

fecdd3

fda4af

fb7185

f43f5e

e11d48

be123c

9f1239

881337

4c0519
emerald
ecfdf5

d1fae5

a7f3d0

6ee7b7

34d399

10b981

059669

047857

065f46

064e3b

022c22
sky
f0f9ff

e0f2fe

bae6fd

7dd3fc

38bdf8

0ea5e9

0284c7

0369a1

075985

0c4a6e

082f49
teal
f0fdfa

ccfbf1

99f6e4

5eead4

2dd4bf

14b8a6

0d9488

0f766e

115e59

134e4a

042f2e
cyan
ecfeff

cffafe

a5f3fc

67e8f9

22d3ee

06b6d4

0891b2

0e7490

155e75

164e63

083344
zinc
fafafa

f4f4f5

e4e4e7

d4d4d8

a1a1aa

71717a

52525b

3f3f46

27272a

18181b

09090b
indigo
eef2ff

e0e7ff

c7d2fe

a5b4fc

818cf8

6366f1

4f46e5

4338ca

3730a3

312e81

1e1b4b
violet
f5f3ff

ede9fe

ddd6fe

c4b5fd

a78bfa

8b5cf6

7c3aed

6d28d9

5b21b6

4c1d95

2e1065
purple
faf5ff

f3e8ff

e9d5ff

d8b4fe

c084fc

a855f7

9333ea

7e22ce

6b21a8

581c87

3b0764
red
fef2f2

fee2e2

fecaca

fca5a5

f87171

ef4444

dc2626

b91c1c

991b1b

7f1d1d

450a0a
amber
fffbeb

fef3c7

fde68a

fcd34d

fbbf24

f59e0b

d97706

b45309

92400e

78350f

451a03
fuchsia
fdf4ff

fae8ff

f5d0fe

f0abfc

e879f9

d946ef

c026d3

a21caf

86198f

701a75

4a044e