By · Updated

CSS Colour Names

Search by Name or Hex Code and Export as CSV or JSON

No ratings yet

Loading…

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the CSS Colour Names works

These CSS colour names are every keyword a browser accepts in place of a hex code, from aliceblue to yellowgreen. All 148 are listed with their hex value and rgb() equivalent, so you can search for a name you half remember or find which keyword matches a hex code exactly.

Where the CSS colour names come from

The list grew in three steps. HTML 4 defined sixteen basic colours, the ones every early browser knew. The X11 window system on Unix had a much longer list, and browsers adopted it in the late 1990s, which is where names like papayawhip and lightgoldenrodyellow come from. CSS Color Module Level 4 fixed the set at 148, including rebeccapurple, added in 2014 in memory of Rebecca Meyer.

Duplicates and oddities

Seven pairs are the same colour spelled gray and grey, and aqua and cyan are identical, as are fuchsia and magenta. Some names are surprising: darkgray is lighter than gray, because the X11 and HTML lists were merged without being reconciled. The names are case-insensitive, so Tomato and tomato are the same.

When to use a name instead of a hex code

Names are easy to read in prototypes, examples and teaching material. In production stylesheets most teams prefer custom properties holding hex or oklch() values, so the palette lives in one place. transparent and currentcolor are also keywords but not named colours, so they are not in this table.

FAQ

How many named colours does CSS have?

CSS Color Module Level 4 defines 148 named colours, counting both spellings of the grey pairs separately. Every current browser supports all of them. There is no plan to add more, apart from system colours such as Canvas, which change with the user's theme and have no fixed hex value.

Are HTML colour names the same as CSS colour names?

Yes. HTML attributes such as bgcolor and CSS properties read the same keyword list, so any name here works in both. The HTML 4 specification only guaranteed sixteen of them, but browsers have supported the full list for over twenty years.

Can I reuse this colour name list?

Yes. The names and values come from a W3C specification and are facts rather than creative work, and the table is released under CC0. Download the CSV or JSON for a design tool, a palette generator or a test fixture.

See also: all Tech Data tools, Everyday Data.

Related tools