Color Tools
Color Name Finder - Find the Nearest CSS Color Name
Enter any hex, RGB, or CSS color and instantly find its exact or nearest CSS named color. See the 5 closest matches with swatches. Free, browser-only.
Exact match
tomato
Your color
5 nearest CSS colors
tomato
#FF6347
coral
#FF7F50
salmon
#FA8072
indianred
#CD5C5C
peru
#CD853F
Hue neighborhood
What are CSS named colors?
CSS defines 148 named colors that can be used directly in stylesheets without a hex value -
for example tomato, cornflowerblue, and rebeccapurple.
These names are defined in the CSS Colors Level 4 specification and are supported in all
modern browsers.
How the nearest-color algorithm works
For colors that don't exactly match a named color, this tool computes the Euclidean distance in sRGB color space between your input and every named color, then returns the closest one. Distance is calculated as:
distance = √((r₁−r₂)² + (g₁−g₂)² + (b₁−b₂)²)
A distance of 0 means a perfect match. The maximum possible distance (black to white) is approximately 441.7.
Accepted input formats
- 6-digit hex:
#ff6347orff6347 - 3-digit hex:
#f63 - RGB:
rgb(255, 99, 71) - RGBA:
rgba(255, 99, 71, 1)(alpha ignored) - CSS color name:
tomato
Notable CSS named colors
- rebeccapurple (#663399): added in CSS Color Level 4 in 2014 in honor of Rebecca Meyer, the daughter of web standards pioneer Eric Meyer, who died of cancer at age 6. It was the first color named for a person in the CSS specification.
- cornflowerblue (#6495ED): one of the most whimsically named colors, a medium-bright blue that was the default background color for text fields in early web browsers and is still used as a focus color in some browser stylesheets.
- hotpink (#FF69B4): added as a recognized color name, hotpink has no formal definition in any color standard prior to CSS - it was simply added to the CSS named colors list by browser implementers and later standardized.
- papayawhip (#FFEFD5) and peachpuff (#FFDAB9): two of the more memorable food-inspired color names, both a warm cream-orange hue.
Named color categories
The 140+ CSS named colors can be roughly grouped by hue family:
- Reds: red, crimson, darkred, firebrick, indianred, tomato, coral, salmon, orangered (~12 names)
- Oranges/Yellows: orange, gold, yellow, khaki, moccasin, peachpuff, bisque (~15 names)
- Greens: green, lime, darkgreen, forestgreen, olive, chartreuse, springgreen, mediumseagreen (~25 names)
- Blues: blue, navy, royalblue, dodgerblue, deepskyblue, steelblue, powderblue, lightblue (~20 names)
- Purples/Pinks: purple, violet, magenta, orchid, plum, thistle, hotpink, deeppink, lavender (~18 names)
- Browns/Neutrals: brown, saddlebrown, sienna, tan, wheat, beige, ivory, linen, snow (~15 names)
- Grays: gray/grey, darkgray, lightgray, silver, gainsboro, whitesmoke, dimgray (~10 names)