Color Name to HEX
Selected color
—
RGB:
Nearest name for your HEX code
tomato — exact match
No CSS color is called that — check the spelling.
Find the HEX code for any color name free. Search all 148 CSS named colors, or paste a HEX code to find its nearest name, with copy buttons included here.
What is the HEX code for this color name?
The HEX code for tomato is #FF6347, and this page answers the same question for all 148 CSS named colors. Type a name and the tool answers with the exact HEX code, the RGB values, and a swatch — no guessing, no close-enough. The 148 names are the official CSS list, so the same name gives the same HEX code in every browser.
Named colors are the oldest way to write color in CSS: color: tomato; works in any stylesheet, and it reads better than color: #FF6347; when a human is scanning the file. The trade-off is choice — there are only 148 names, against 16.7 million HEX colors.
Your lookup, live
Type “tom” in the search box above and the list narrows live to matching names.
Worked examples: tomato, rebeccapurple, and goldenrod
Tomato is #FF6347, rebeccapurple is #663399, and goldenrod is #DAA521. Tomato is a warm red-orange: red 255, green 99, blue 71. Rebeccapurple is a deep purple — red 102, green 51, blue 153 — named in memory of Eric Meyer's daughter Rebecca, the only CSS color named after a person. Goldenrod is a rich yellow-gold at red 218, green 165, blue 33.
These three are worth knowing because each teaches something: tomato shows that food names are real CSS names, rebeccapurple shows the list has a human story in it, and goldenrod shows that a name can sound like one color (a flower) and be a slightly different shade than you expect.
Three famous names
tomato
#FF6347
rgb(255, 99, 71)
A food name that is a real CSS name.
rebeccapurple
#663399
rgb(102, 51, 153)
Named in memory of Eric Meyer’s daughter Rebecca — the only CSS color named after a person.
goldenrod
#DAA520
rgb(218, 165, 32)
A flower name that is a slightly different shade than you expect.
The green surprise — green is not #00FF00
The green surprise is that CSS green is #008000, a dark green, while the bright green most people picture is lime, #00FF00. Typing color: green; in CSS gives a deep, forest-like green, not the vivid green of a highlighter. The same trap catches two more pairs: aqua is the same color as cyan (#00FFFF), and fuchsia is the same color as magenta (#FF00FF).
The list has several such surprises because it grew from the old 16 VGA colors plus the X11 color set, not from a tidy design. The only safe move is to check the swatch, not the name — which is why every row on this page shows the color itself next to its name.
Surprise pairs — check the swatch, not the name
green
#008000
lime
#00FF00
aqua
#00FFFF
cyan
#00FFFF
fuchsia
#FF00FF
magenta
#FF00FF
Aqua and cyan share #00FFFF; fuchsia and magenta share #FF00FF — but green #008000 and lime #00FF00 do not match.
HEX to name — finding the nearest named color
Paste a HEX code and the tool names the nearest CSS color, saying plainly whether it is exact or only near. A paste of #FF6347 answers “tomato — exact match.” A paste of #F05555 answers with the nearest name and a plain note like “nearest name: tomato — your color is a little darker and redder than tomato,” so the visitor is never misled into thinking a near match is exact.
Nearest is judged by how far apart the colors are in a perceptual color space, not by how close the HEX digits look — two codes that look similar as text can be visibly different colors, and two codes that look different can be near-identical. The page says the match is nearest, not exact, whenever it is not one of the 148.
Reverse lookup — your color beside its nearest name
exact match
Paste a HEX code into the tool above to see your color matched here.
The 16 basic colors — the list inside the list
Inside the 148 names sit the 16 basic colors, the old VGA palette every browser still supports: black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, and aqua. These 16 are the safest names to use, because they have worked in every browser since the early web. Their HEX codes are the simple ones: black #000000, white #FFFFFF, red #FF0000, lime #00FF00, blue #0000FF, yellow #FFFF00.
The other 132 names come from the X11 set and cover the subtler shades — salmon, khaki, lavender, sienna, turquoise, and the rest. They work in all modern browsers too, but the 16 are the ones worth memorizing first, and the filter chips on this page show them as their own group.
The 16 basic colors — tap any swatch to load it
When should you use a color name instead of HEX?
Use a color name instead of HEX when a human will read the code and the exact shade does not matter — and use HEX whenever the shade must be exact. color: tomato; is clearer than color: #FF6347; in a quick prototype or a teaching example, because the reader knows at a glance what color is meant. But a brand color must be HEX: there is no CSS name for most brand shades, and a name that is merely close is the wrong color.
The practical rule is that names are for sketches and learning, and HEX codes are for shipping. This page serves both: it gives the exact HEX for any name, so a sketch built with names can be converted to exact codes before it ships.
Sketch vs ship — the same stylesheet, two forms
h1 { color: tomato; }
button { background: rebeccapurple; }
a { color: goldenrod; }Browsing all 148 names by family
All 148 names are browsable by family on this page, so a visitor who knows roughly what they want can find it without knowing the exact name. The family chips — reds, oranges, yellows, greens, blues, purples, pinks, browns, whites, grays, blacks — narrow the list to that family, and each row shows the swatch, the name, and the HEX code. A visitor looking for a soft pink finds lightpink, hotpink, and deeppink together in one place.
Browsing beats searching when the visitor does not know the name yet: they can compare the family's shades side by side and pick by eye, then copy the exact HEX code of the one they chose. That is the same workflow as a paint chart, translated to the screen.
Browse by family — lightest to darkest
Reds (10)
Tap a swatch to load it into the lookup above.
Oranges (6)
Tap a swatch to load it into the lookup above.
Yellows (8)
Tap a swatch to load it into the lookup above.
Greens (22)
Tap a swatch to load it into the lookup above.
Blues (28)
Tap a swatch to load it into the lookup above.
Purples (13)
Tap a swatch to load it into the lookup above.
Pinks (11)
Tap a swatch to load it into the lookup above.
Browns (10)
Tap a swatch to load it into the lookup above.
Whites (23)
Tap a swatch to load it into the lookup above.
Grays (16)
Tap a swatch to load it into the lookup above.
Blacks (1)
Tap a swatch to load it into the lookup above.
All color tools
21 tools, one topic — see About Hex Color Code Picker for who built this site.
- Color Picker from ImageUpload an image, click a pixel, and read its HEX code.
- Screen EyedropperSample any pixel on your screen.
- RGB to HEX ConverterTurn three RGB numbers into one HEX code.
- HEX to RGB ConverterTurn a HEX code into three RGB numbers.
- HEX to HSL ConverterTurn a HEX code into hue, saturation, and lightness.
- HSL to HEX ConverterTurn HSL values back into a HEX code.
- HEX to HSV ConverterTurn a HEX code into hue, saturation, and value.
- HEX to CMYK ConverterTurn a HEX code into approximate print values.
- RGB to HSL ConverterTurn RGB numbers into hue, saturation, and lightness.
- HEX to OKLCH ConverterTurn a HEX code into the modern OKLCH format.
- Color ConverterSee one color in every format at once.
- HEX to RGBA ConverterTurn a HEX code into RGB with transparency.
- Color Name to HEXLook up any of the 148 CSS named colors.
- Color Palette GeneratorBuild a five-color palette from one color.
- Shades GeneratorBuild 10 tints and 10 shades from one color.
- Gradient GeneratorBuild a linear or radial gradient and copy the CSS.
- Contrast CheckerCheck any text and background pair for AA and AAA.
- Color MixerMix two colors and see the result.
- Random Color GeneratorPick a random color from all 16,777,216 HEX colors.
- Color Blindness SimulatorSee your colors as color-blind users see them.
- Color ChartThe 148 named colors with HEX, RGB, and HSL.
No tool matches your search.
Frequently asked questions
Tomato is #FF6347. Its RGB values are rgb(255, 99, 71). Type “tomato” into the search box on this page and the tool shows the swatch, the HEX code, and a copy button.
Rebeccapurple is #663399. It is a deep purple (rgb(102, 51, 153)) named after Rebecca Meyer, the daughter of CSS author Eric Meyer — the only CSS color named after a person.
No — CSS green is #008000, a dark green, and #00FF00 is lime. This is the most common named-color surprise. If you want the bright green, write lime or #00FF00, not green.
Yes — aqua and cyan are both #00FFFF. They are two names for the same color, and the same is true of fuchsia and magenta, which are both #FF00FF. The CSS list has several such duplicate pairs.
There are 148 CSS named colors. They are the 16 basic VGA colors plus 132 names from the X11 color set, including rebeccapurple. This page covers all 148 — no more, no fewer — and a color that is not one of them gets a nearest-name answer, never a false exact match.
Yes — color: tomato; works in every browser, and so do all 148 names. Names are clearest for prototypes and teaching; for a brand color or any shade that must be exact, copy the HEX code instead, because most exact shades have no name.