HTML Colour Names and Codes
Every CSS named colour grouped by family, with its hex and RGB values. Search by name or code, and click any swatch to copy it.
How to use it
- Search by colour name or by hex value.
- Click any swatch to copy its hex code.
- The RGB triplet is shown under each name.
CSS defines 140 named colours — keywords like tomato, cornflowerblue and rebeccapurple that browsers recognise directly, without needing a hex or rgb() value at all. This is the full reference list, grouped by colour family, each one shown with its exact hex and RGB values and searchable by either name or code.
Names vs hex codes
Every current browser supports the full set of CSS named colours, and using one — background: tomato; — works exactly the same as the equivalent hex code. In practice hex remains far more common in real stylesheets, mainly because it is exact and covers all 16.7 million RGB combinations rather than 140 fixed points, and because design tools hand off colours as hex codes by default.
Named colours are still genuinely useful for quick prototyping, for CSS that reads more clearly to a human — border: 1px solid gray is more legible at a glance than border: 1px solid #808080 — and for anyone learning CSS who wants a colour without reaching for a picker.
Gray and grey — both work
CSS accepts both spellings for every grey-family colour name, so gray and grey, darkgray and darkgrey, lightslategray and lightslategrey are exact synonyms with identical values — a concession the CSS specification makes deliberately for both American and British spelling.
Questions people ask
Can I use colour names instead of hex codes?
Yes — every browser supports the CSS named colours. Hex is more common in practice because it is exact and covers the full range rather than 140 fixed points.
Why are there two spellings, gray and grey?
CSS accepts both for the greys, along with variants like DarkGray and DarkGrey. They are identical.
Is anything uploaded?
No. Everything runs in your browser — no file, image or snippet you use here ever leaves your device.
Last updated 22 August 2026