Hex Color Code Chart

Showing 141 of 141 named CSS colors

How to Use This Tool

  1. 1.Browse colors by scrolling the chart, or type a color name (like "coral") or hex value (like "FF7F50") into the search bar to filter instantly
  2. 2.Click a color group button (Red, Blue, Green, etc.) to show only that hue family — the count next to each label tells you how many colors it contains
  3. 3.Switch between Grid view (visual swatches) and Table view (detailed list with hex, RGB, and group data) using the toggle at the top right
  4. 4.Click any color swatch to expand its detail panel showing hex, RGB, and HSL values plus a ready-to-paste CSS snippet
  5. 5.Click the Copy button next to any value to copy it to your clipboard — works for hex codes, RGB values, HSL values, and full CSS blocks

Rate this tool

Hex Color Code Chart: A Complete Reference for Web Colors

A hex color code chartmaps every CSS named color to its 6-character hexadecimal value — and the full list holds exactly 148 entries, not the 140 you'll see cited on most reference sites. That discrepancy comes from four duplicate pairs (Aqua/Cyan, Fuchsia/Magenta, DarkGray/DarkGrey, and a handful of British spelling variants) that some lists count once and others count twice. The chart above includes every valid keyword a browser will accept, searchable and grouped by hue family.

Complete hex color code chart showing all 148 CSS named colors organized by hue group with hex values and color swatches

148 Named Colors and Where They Came From

CSS didn't invent its color names. The list descends from the X11 window system, a graphical framework developed at MIT in 1984. X11 shipped with a file called rgb.txt that mapped human-readable names to RGB triplets so Unix developers could write LightSteelBlue instead of memorizing 176, 196, 222. When HTML 4.01 formalized web standards in 1999, it adopted 17 colors (the 16 VGA colors plus Orange). Then SVG 1.0 in 2001 pulled in 130+ additional X11 names. CSS 2.1 inherited SVG's set, and CSS Color Level 4 added one final entry — rebeccapurple (#663399) — in 2014.

The result is a patchwork. Some names feel intuitive (Red, Gold, Navy). Others are oddly specific — PapayaWhip is #FFEFD5, a warm off-white that has nothing to do with how an actual papaya looks. LemonChiffon (#FFFACD) is closer to cream than lemon. And Peru(#CD853F) was named after the country's desert landscapes, which explains why it's a sandy brown rather than a flag color.

Reading a Hex Code: What Each Digit Pair Means

Every 6-character hex code is three pairs of base-16 digits: the first pair sets red intensity, the second green, the third blue. Each pair ranges from 00 (zero brightness) to FF (maximum brightness, 255 in decimal). So #FF0000 is full red with no green or blue, and #00FF00 is full green. Mix them: #FFFF00 combines full red and full green to produce yellow. If you need a hex to RGB converter to decode specific values, each pair follows the same math: multiply the first digit by 16, then add the second. The digit A equals 10, B is 11, up through F at 15.

Worked example: #2563EB(our site's brand blue). Red channel: 2×16 + 5 = 37. Green: 6×16 + 3 = 99. Blue: E×16 + B = 14×16 + 11 = 235. That's RGB(37, 99, 235) — a vivid medium blue with a dominant blue channel 6.4× stronger than red.

The Gray Naming Trap That Confuses Everyone

Pop quiz: is DarkGray darker than Gray? Nope. It's lighter. This is the single most counter-intuitive thing in the CSS color spec. Here's the actual brightness ordering from darkest to lightest:

CSS NameHexRGB (all equal)Lightness
Black#00000000%
DimGray#69696910541%
Gray#80808012850%
DarkGray ⚠️#A9A9A916966%
Silver#C0C0C019275%
LightGray#D3D3D321183%
Gainsboro#DCDCDC22086%
White#FFFFFF255100%

DarkGray sits at lightness 66% while plain Gray is at 50%. The X11 system defined "dark" and "light" variants relative to a base color that doesn't match what you'd expect. This has tripped up developers since 1987 — and it's why most design systems (Tailwind, Material, Bootstrap) avoid named CSS colors entirely and use their own numbered gray scales.

The Original 17: HTML 4.01's Color Keywords

Before CSS Color Level 3 pulled in the full X11 set, HTML 4.01 recognized exactly 17 color keywords. These are the only colors guaranteed to work in every browser, email client, and legacy rendering engine:

NameHexNameHex
Black#000000Silver#C0C0C0
Gray#808080White#FFFFFF
Maroon#800000Red#FF0000
Purple#800080Fuchsia#FF00FF
Green#008000Lime#00FF00
Olive#808000Yellow#FFFF00
Navy#000080Blue#0000FF
Teal#008080Aqua#00FFFF
Orange#FFA500 (added in CSS 2.1, the 17th keyword)

Notice the pattern: every channel is either 00, 80, or FF. That's by design — the original 16 VGA colors used only these three intensity levels, giving a 3×3×3 = 27 possible combinations. The spec picked 16 of the most useful ones. Orange broke the pattern when it was added later.

Named Colors vs. Raw Hex — When to Use Which

Named colors look clean in code. color: tomato is more readable than color: #FF6347. But there's a practical limit to when they're the right choice.

ScenarioBest ChoiceWhy
Prototyping / quick demosNamed colorsFaster to type, self-documenting, no lookup needed
Brand colors in productionRaw hex / CSS variablesBrand guides specify exact hex values — named colors are approximations
Design system tokensHSL or oklch variablesShade scales need mathematical relationships between values
Email HTML templatesRaw hexSome email clients only support the 17 HTML keywords — extended names may fail
Teaching / code examplesNamed colorsStudents understand red faster than #FF0000

The bottom line: named colors are excellent for prototyping, teaching, and throwaway code. For production, use your RGB to hex converter and store exact values in CSS custom properties or design tokens. Named colors can't be adjusted mathematically — you can't lighten tomato by 10% without first converting it to HSL.

Finding the Closest Named Color to Any Hex Value

Got #3A7BDE from a design mockup and want to know the nearest CSS name? You need Euclidean distance in RGB color space. The formula:

distance = √((r₁ - r₂)² + (g₁ - g₂)² + (b₁ - b₂)²)

For #3A7BDE (which is RGB 58, 123, 222), compare against every named color. CornflowerBlue (#6495ED) gives a distance of √((58-100)² + (123-149)² + (222-237)²) = √(1764 + 676 + 225) = √2665 ≈ 51.6. SteelBlue (#4682B4) is closer at √((58-70)² + (123-130)² + (222-180)²) = √(144 + 49 + 1764) = √1957 ≈ 44.2. But DodgerBlue (#1E90FF) wins at distance ≈ 52.3 — wait, actually RoyalBlue (#4169E1) at √((58-65)² + (123-105)² + (222-225)²) = √(49 + 324 + 9) = √382 ≈ 19.5 is the real winner.

This illustrates why you can't eyeball it. Colors that look similar on screen can have very different RGB distances. Our chart above calculates this automatically when you select a color. The theoretical maximum distance between any two sRGB colors is √(255² + 255² + 255²) ≈ 441.7 — the distance from pure black to pure white.

#663399 and the Story Behind RebeccaPurple

The 148th and final named CSS color has an unusual origin. In June 2014, Eric Meyer— a foundational figure in CSS who literally wrote the book on CSS (O'Reilly, 2000) — lost his six-year-old daughter Rebecca to brain cancer. The web development community proposed adding her favorite color to the CSS specification as a tribute.

#663399 was chosen because it matched Rebecca's purple. In RGB terms, that's (102, 51, 153) — a mid-tone violet with red at 40% and blue at 60%. The CSS Color Level 4 specification added it as rebeccapurple(all lowercase, no space). It shipped in Chrome 38, Firefox 33, and Safari 9 within months. It's the only CSS color named after a real person and the only one added since the X11 set was adopted.

How Browsers Actually Render Named Colors

When you write color: coral, the browser doesn't store the word "coral" anywhere in the render pipeline. During CSS parsing, the engine does a case-insensitive lookup against its internal color name table and replaces the keyword with the resolved RGBA value — in Coral's case, rgba(255, 127, 80, 1). From that point forward, the named color is gone. The computed style, the DevTools readout, and the rendering output all use the numeric value.

This matters for performance: named colors add zero runtime cost because resolution happens once during style computation. But it also means getComputedStyle() never returns a named color — it always returns rgb() or rgba(). If you're writing JavaScript that reads colors from the DOM and compares them, compare the RGB values, not strings. Testing === "coral" will always fail. Use our color picker to inspect computed values and see exactly what the browser outputs.

One last quirk: browser DevTools differ in how they display colors. Chrome defaults to hex in the Styles panel, Firefox shows the authored format (name or hex), and Safari uses RGB. You can click the swatch in any browser's DevTools to cycle between formats. None of them affect the actual rendered color — it's purely a display preference.

Marko Sinko
Marko SinkoTechnical Tools Editor

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Marko builds and verifies the technical tools, number system converters, and scientific calculators across UnitCalcTools, ensuring mathematical precision and developer-friendly interfaces.

Last updated: April 13, 2026LinkedIn

Frequently Asked Questions

Pure red is #FF0000, which equals RGB(255, 0, 0). CSS also defines DarkRed as #8B0000 (RGB 139, 0, 0), Crimson as #DC143C, FireBrick as #B22222, IndianRed as #CD5C5C, and OrangeRed as #FF4500. The named color 'Red' and #FF0000 are identical — the browser replaces the name with the hex value during rendering.
CSS Level 4 defines exactly 148 named colors, including the 17 original HTML colors from the HTML 4.01 spec (aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, yellow) plus 131 additions from the X11 color set and SVG specification. The keyword 'rebeccapurple' (#663399) was the last addition, added in 2014 as a tribute to Eric Meyer's daughter.
CSS inherited its named colors from the X11 color system used in Unix, where 'Green' was defined as half-brightness green (0, 128, 0) rather than full-brightness. Full green (0, 255, 0) is called 'Lime' in CSS. This catches many developers off guard because #00FF00 feels like the "real" green. The discrepancy has existed since 1987 when X11 standardized its color names.
Google's primary brand blue is #4285F4, which equals RGB(66, 133, 244). This isn't a named CSS color — you must use the hex value directly. The nearest named CSS color is CornflowerBlue (#6495ED), but it's noticeably lighter and less saturated. For brand-accurate colors, always use the exact hex code from the brand guidelines rather than approximating with named colors.
Yes. Tailwind supports arbitrary hex values with bracket notation, like bg-[#FF5733] or text-[#2563EB]. For colors you reuse, define them in your tailwind.config.js under theme.extend.colors — for example, brand: '#2563EB' — then use bg-brand instead. Named CSS colors work in arbitrary value syntax too: bg-[coral] compiles to background-color: coral.
Counter-intuitively, DarkGray (#A9A9A9) is actually lighter than Gray (#808080). Gray sits at RGB(128, 128, 128) — exact mid-brightness — while DarkGray is at RGB(169, 169, 169). The X11 naming system defined these names relative to each other in a non-obvious order: DimGray (#696969) is the darkest, then Gray (#808080), then DarkGray (#A9A9A9), then Silver (#C0C0C0), then LightGray (#D3D3D3).
Yes. #00FFFF is both Aqua and Cyan — they're identical colors with two valid CSS names. Similarly, #FF00FF is both Fuchsia and Magenta. These duplicates exist because the original HTML 4.01 spec used Aqua and Fuchsia, while the X11/SVG color set used Cyan and Magenta for the same values. Browsers accept both names interchangeably.
Calculate the Euclidean distance in RGB space: sqrt((r1-r2)^2 + (g1-g2)^2 + (b1-b2)^2). The named color with the smallest distance is the closest match. For #2563EB, the nearest named color is DodgerBlue (#1E90FF) at a distance of about 28.2 units. Our chart above computes this automatically — click any swatch to see the closest named color. The maximum possible distance between any two colors is 441.7 (black to white).

Related Tools