Color Codes Reference

Color codes reference: common CSS named colors mapped to HEX and RGB values, with swatch previews for quick selection in frontend styles.

SwatchNameHEXRGB
Black#000000rgb(0, 0, 0)
White#FFFFFFrgb(255, 255, 255)
Red#FF0000rgb(255, 0, 0)
Green#008000rgb(0, 128, 0)
Lime#00FF00rgb(0, 255, 0)
Blue#0000FFrgb(0, 0, 255)
Yellow#FFFF00rgb(255, 255, 0)
Cyan#00FFFFrgb(0, 255, 255)
Magenta#FF00FFrgb(255, 0, 255)
Gray#808080rgb(128, 128, 128)
Silver#C0C0C0rgb(192, 192, 192)
Maroon#800000rgb(128, 0, 0)
Olive#808000rgb(128, 128, 0)
Navy#000080rgb(0, 0, 128)
Teal#008080rgb(0, 128, 128)
Purple#800080rgb(128, 0, 128)
Orange#FFA500rgb(255, 165, 0)
Pink#FFC0CBrgb(255, 192, 203)
Brown#A52A2Argb(165, 42, 42)
Gold#FFD700rgb(255, 215, 0)
Tomato#FF6347rgb(255, 99, 71)
Crimson#DC143Crgb(220, 20, 60)
SteelBlue#4682B4rgb(70, 130, 180)
DodgerBlue#1E90FFrgb(30, 144, 255)
ForestGreen#228B22rgb(34, 139, 34)
HotPink#FF69B4rgb(255, 105, 180)
Indigo#4B0082rgb(75, 0, 130)
Violet#EE82EErgb(238, 130, 238)
Chocolate#D2691Ergb(210, 105, 30)
Salmon#FA8072rgb(250, 128, 114)
SkyBlue#87CEEBrgb(135, 206, 235)
SlateGray#708090rgb(112, 128, 144)
LightGray#D3D3D3rgb(211, 211, 211)
DarkSlateGray#2F4F4Frgb(47, 79, 79)
Coral#FF7F50rgb(255, 127, 80)
Turquoise#40E0D0rgb(64, 224, 208)
Khaki#F0E68Crgb(240, 230, 140)
Plum#DDA0DDrgb(221, 160, 221)

Frequently Asked Questions

What is the difference between HEX and RGB?

They represent the same color. HEX is hexadecimal (e.g. #FF0000); RGB is a decimal function (rgb(255,0,0)). Modern CSS also supports rgb(255 0 0 / 0.5) alpha and #RRGGBBAA.

What are web-safe colors?

Early displays could only reliably show a 216-color palette. It is no longer necessary, but classic named colors like red/blue/green remain the most used.

How do I ensure accessible color contrast?

Aim for text/background contrast ≥ 4.5:1 (WCAG AA). Do not judge by named color alone; use a contrast checker.

How many named CSS colors are there?

The CSS spec defines 148 named colors (including transparent and currentColor). This table lists the most common basic and extended colors.