Skip to main content

HTML Color Codes

All 148 named HTML colors with their HEX and RGB codes. Search the list, click any swatch to copy its value.

Showing 148 of 148 colors

What are HTML color codes?

A browser accepts a color three ways: by name (tomato), by HEX triplet (#ff6347), or by functional notation (rgb(255, 99, 71), hsl(9, 100%, 64%)). The names are not arbitrary - they are a fixed dictionary in the CSS specification, so mediumseagreen renders the identical pixel on every browser on every machine.

HEX codes are the compact form of the same thing: two hex digits per red, green and blue channel, #ff6347 meaning 255 red, 99 green, 71 blue. Need the longhand forms - RGBA with alpha, HSL, CMYK, HSV? The color converter turns any value on this page into all of them.

Using named colors well

  • Names read like intent (background: whitesmoke), which helps teaching and quick prototypes.
  • The dictionary is fixed: no named colour is “brand blue” - real projects still live in HEX.
  • Duplicates are part of the standard: aqua and cyan, grey and gray are two names for one value.
  • Accessibility is about pairs, not names: test any text/background you pick with the contrast checker.
  • Looking for one specific hue? The interactive color wheel shows where each named color sits and what harmonizes with it.

HTML Color Codes FAQ

What are HTML color codes?

HTML color codes are the ways CSS and HTML accept a color: a name from the browser dictionary like tomato, a six-digit HEX value like #ff6347, or a functional notation like rgb(255, 99, 71). All three describe the same color, and every row on this page shows all of its codes so you can copy whichever your stylesheet needs.

How many named HTML colors are there?

Browsers recognize 148 named colors. HTML 4 defined 16, CSS Color Level 3 expanded that to 147, and SVG 2 / CSS Color Level 4 added rebeccapurple for 148. This table lists them all, alphabetically, each with its HEX and RGB value.

What is rebeccapurple?

rebeccapurple (#663399) is a named color added in 2014 as a tribute to Rebecca Meyer, the six-year-old daughter of CSS contributor Daniel Meyer. It was the first change to the CSS specification made through a personal petition and it remains part of the standard list.

Can I use color names instead of HEX in CSS?

Yes: color: tomato and color: #ff6347 are equivalent. Names are readable but cover only this fixed list, while any HEX value is legal - most design work uses HEX, and names are handy for quick prototypes and teaching.

Are grey and gray both valid?

Both spellings are in the list, because the named set keeps duplicate entries from its HTML 4 and X11 ancestors - aqua and cyan, fuchsia and magenta, grey and gray all point at identical values. The same is why colour names work even though the dictionary is spelled the American way.

How do I copy a color code?

Click any swatch card and its value is copied in your preferred notation - HEX, RGB, HSL and the rest follow the site-wide copy setting - while the color is also added to the shared stack for the other tools on this site.

Does this list include system colors?

No. Values like ButtonFace or Highlight come from the operating system theme and differ between machines, so they are not fixed codes. This page lists only the colors that mean the same number everywhere.

Related Tools