0xCONVERTER-HEX

Reference

Hex Color Chart

Named CSS colors with their hex and RGB values, arranged so you can find one by eye.

Primary and secondary colors

Screens mix light rather than pigment, so the secondaries are not the ones you learned with paint. Each is two channels at full strength.

#FF0000red
#00FF00lime
#0000FFblue
#FFFF00yellow
#00FFFFaqua / cyan
#FF00FFfuchsia / magenta
#FFFFFFwhite
#000000black

Greyscale

Any color with three equal pairs is grey. The first digit of the pair is what moves.

#000000#000000
#222222#222222
#444444#444444
#666666#666666
#808080#808080
#999999#999999
#BBBBBB#BBBBBB
#DDDDDD#DDDDDD
#F5F5F5#F5F5F5
#FFFFFF#FFFFFF

Named CSS colors

CSS defines around 140 color names. These are the ones that see real use, grouped by family so you can scan for the shade you want rather than guessing at a code.

#000000black
#696969dimgray
#808080gray
#A9A9A9darkgray
#C0C0C0silver
#D3D3D3lightgray
#DCDCDCgainsboro
#FFFFFFwhite
#800000maroon
#8B0000darkred
#B22222firebrick
#FF0000red
#DC143Ccrimson
#FF6347tomato
#FF7F50coral
#FA8072salmon
#FF4500orangered
#FF8C00darkorange
#FFA500orange
#FFD700gold
#808000olive
#BDB76Bdarkkhaki
#F0E68Ckhaki
#FFFF00yellow
#006400darkgreen
#008000green
#228B22forestgreen
#2E8B57seagreen
#6B8E23olivedrab
#32CD32limegreen
#00FF00lime
#00FF7Fspringgreen
#008080teal
#008B8Bdarkcyan
#20B2AAlightseagreen
#40E0D0turquoise
#00FFFFaqua
#5F9EA0cadetblue
#4682B4steelblue
#87CEEBskyblue
#000080navy
#00008Bdarkblue
#0000CDmediumblue
#0000FFblue
#4169E1royalblue
#6495EDcornflowerblue
#1E90FFdodgerblue
#6A5ACDslateblue
#4B0082indigo
#800080purple
#8B008Bdarkmagenta
#FF00FFmagenta
#DA70D6orchid
#EE82EEviolet
#DDA0DDplum
#D8BFD8thistle
#A52A2Abrown
#A0522Dsienna
#D2691Echocolate
#CD853Fperu
#D2B48Ctan
#F5DEB3wheat
#F5F5DCbeige
#FFFFF0ivory

The same list as values

Sortable by eye, copyable by hand. Every hex code here is the exact value CSS assigns to the name.

NameHexRGB
black#0000000, 0, 0
dimgray#696969105, 105, 105
gray#808080128, 128, 128
darkgray#A9A9A9169, 169, 169
silver#C0C0C0192, 192, 192
lightgray#D3D3D3211, 211, 211
gainsboro#DCDCDC220, 220, 220
white#FFFFFF255, 255, 255
maroon#800000128, 0, 0
darkred#8B0000139, 0, 0
firebrick#B22222178, 34, 34
red#FF0000255, 0, 0
crimson#DC143C220, 20, 60
tomato#FF6347255, 99, 71
coral#FF7F50255, 127, 80
salmon#FA8072250, 128, 114
orangered#FF4500255, 69, 0
darkorange#FF8C00255, 140, 0
orange#FFA500255, 165, 0
gold#FFD700255, 215, 0
olive#808000128, 128, 0
darkkhaki#BDB76B189, 183, 107
khaki#F0E68C240, 230, 140
yellow#FFFF00255, 255, 0
darkgreen#0064000, 100, 0
green#0080000, 128, 0
forestgreen#228B2234, 139, 34
seagreen#2E8B5746, 139, 87
olivedrab#6B8E23107, 142, 35
limegreen#32CD3250, 205, 50
lime#00FF000, 255, 0
springgreen#00FF7F0, 255, 127
teal#0080800, 128, 128
darkcyan#008B8B0, 139, 139
lightseagreen#20B2AA32, 178, 170
turquoise#40E0D064, 224, 208
aqua#00FFFF0, 255, 255
cadetblue#5F9EA095, 158, 160
steelblue#4682B470, 130, 180
skyblue#87CEEB135, 206, 235
navy#0000800, 0, 128
darkblue#00008B0, 0, 139
mediumblue#0000CD0, 0, 205
blue#0000FF0, 0, 255
royalblue#4169E165, 105, 225
cornflowerblue#6495ED100, 149, 237
dodgerblue#1E90FF30, 144, 255
slateblue#6A5ACD106, 90, 205
indigo#4B008275, 0, 130
purple#800080128, 0, 128
darkmagenta#8B008B139, 0, 139
magenta#FF00FF255, 0, 255
orchid#DA70D6218, 112, 214
violet#EE82EE238, 130, 238
plum#DDA0DD221, 160, 221
thistle#D8BFD8216, 191, 216
brown#A52A2A165, 42, 42
sienna#A0522D160, 82, 45
chocolate#D2691E210, 105, 30
peru#CD853F205, 133, 63
tan#D2B48C210, 180, 140
wheat#F5DEB3245, 222, 179
beige#F5F5DC245, 245, 220
ivory#FFFFF0255, 255, 240

Two names that trip everyone up

  • green is not #00FF00. CSS green is #008000, a mid-dark green. The full-brightness one is called lime. This dates back to the original sixteen HTML colors and was kept for compatibility.
  • gray and grey both work, as do all their compounds. CSS accepts either spelling throughout.
Use names sparingly

Named colors are convenient for quick prototypes and awful for design systems. They are a fixed, arbitrary set with no internal consistency — there is no way to say “the same red, slightly darker”. Once a project is real, define your own palette in hex or HSL.

Web-safe colors

You may still see references to a 216-color "web-safe" palette, built from the six values 00, 33, 66, 99, CC and FF per channel. It existed because 1990s displays could only show 256 colors at once.

Every display made this century handles 16.7 million colors, so the restriction is obsolete. The palette is worth knowing about only so you can recognise the constraint when you meet it in old documentation and ignore it.

Frequently asked questions

How many named colors does CSS have?

Around 140, including several duplicate spellings such as gray and grey, and aqua and cyan which are the same color.

What is the hex code for red?

#FF0000 for pure red. The named color red maps to exactly that value.

Why is CSS green #008000 rather than #00FF00?

The name was defined that way in the original HTML color set and kept for compatibility. The full-brightness version is named lime.

What is a web-safe color?

One of 216 colors that displayed reliably on 256-color monitors in the 1990s. Modern displays make the restriction meaningless.

Should I use color names in production CSS?

For prototypes they are fine. For a design system define your own palette, because named colors have no consistent relationships to build on.

Are gray and grey both valid?

Yes, and so are both spellings of every compound such as darkgray and darkgrey.