What Color Is This? Find the HEX Code and Name of a Color
What color is this? Identify any color from an image or your screen, get its HEX code, then match it to the closest color name. Step-by-step methods inside.
Updated
To find out what color something is, get its HEX code first and its name second. Sample the color from an image or from your screen to get a code such as #3B82F6, then match that code against a list of named colors to get a name such as royal blue. The code is the exact answer; the name is the nearest human-readable label.
Step 1: get the color into an image
If the color is already in an image file, skip ahead. If it is on your screen, in a web page, an app or a video, take a screenshot:
- Windows: press Windows + Shift + S and drag over the area.
- Mac: press Command + Shift + 4 and drag over the area.
- Phone: use the normal screenshot buttons, then crop.
If the color is on a physical object, photograph it in daylight, away from colored walls and without flash. The section on accuracy below explains why this matters.
Step 2: extract the HEX code
Open the Color Palette Extractor and drop the image in, or click to choose a file. It accepts PNG, JPG, WebP, GIF and SVG. The tool analyses the image and shows its dominant colors as swatches, sorted from dark to light.
- Choose how many colors to show: 4, 6, 8, 10 or 12. Fewer colors give broader averages; more colors pick up smaller areas.
- Switch the format between HEX, RGB and HSL.
- Click a swatch to copy its value, or copy the whole list at once.
One thing to understand: the extractor reports the main colors of the whole image, not the pixel under your cursor. That is ideal for questions like "what colors are in this logo" or "what is the main color of this photo". For "what is the color of this one button", narrow the image down first. Take a tight screenshot of just that area, or crop the picture with the Image Cropper, then run the extractor with the count set to 4. With only one color in the frame, the swatches will all be close to it.
Small details in a large image may not get a swatch of their own, because the tool works from a reduced sample of the picture. Cropping solves that as well.
Step 3: turn the HEX code into a name
Copy the HEX code and paste it into the Color Name Finder. It compares your color with all 148 CSS named colors and shows the closest one, along with the RGB and HSL values of your input.
Next to the name is a match label that tells you how literally to take it:
| Label | Meaning |
|---|---|
| Exact Match | Your code is one of the named colors |
| Very Close | Hard to tell apart by eye |
| Close Match | Same family, visibly different |
| Approximate | A loose description |
| Far Off | No named color is really similar |
For example, #3B82F6 comes back as royalblue, #FF6600 as orangered and #7C3AED as blueviolet. None is exact, but each gives you a word to use in conversation or a search.
There are about 16.7 million possible HEX colors and only 148 CSS names, so most colors do not have a name of their own. Paint brands, fashion and printing systems keep their own, much larger name lists, which is why the same code can be called different things in different places. The list of CSS color names shows the full standard set.
Other ways to sample one exact pixel
When you need a single point and not an overall palette, an eyedropper is the right instrument. Several are probably already on your computer.
- Browser color picker. Clicking the swatch in the Color Name Finder opens your browser's own color picker. In Chrome and Edge on desktop that picker includes an eyedropper button that can sample any pixel on the screen, and the name updates as soon as you pick. Whether an eyedropper is offered depends on your browser and operating system.
- Mac. The Digital Color Meter app, found in the Utilities folder, shows the color values under the pointer.
- Windows. Microsoft PowerToys, a free add-on from Microsoft, includes a Color Picker utility that you open with a keyboard shortcut.
- Browser developer tools. For a color on a web page, right-click the element, choose Inspect and read the value from the styles panel. This gives the exact code the designer wrote, which is more reliable than sampling pixels.
- Image editors. Almost every editor has an eyedropper tool that shows the HEX value of the clicked pixel.
Whichever you use, paste the resulting code into the name finder to get a name.
Why sampled colors are estimates
A HEX code taken from a screenshot of flat artwork, such as a logo or interface, is usually exact or very close. A code taken from a photograph is not, for several reasons.
- Lighting changes everything. The same object gives different values in sunlight, shade and indoor light. Shadows and highlights on one object can differ by more than two named colors do.
- White balance. Cameras adjust colors to make the scene look neutral, and they do not always guess correctly. A warm cast shifts every color toward yellow.
- Compression. JPEG images blend neighboring pixels, especially at sharp edges, so a pixel near a border may be a mix of two colors. Sample from the middle of a flat area.
- Anti-aliasing. Text and thin lines on screen are drawn with blended edge pixels. Zoom in and pick from the solid interior.
- Screens differ. Your display, its brightness and its color settings affect how a code looks, though not the code itself.
This is why two people can disagree about a color in a photo, and why a paint or fabric match should never be made from a screen alone. Use the code as a starting point and compare physical samples.
What to do with the code
Once you have the HEX value, the rest of the color toolbox opens up. The Color Converter turns it into RGB and HSL for CSS. The Color Palette Generator finds colors that go with it. And if you plan to put text on it, the WCAG color contrast guide explains how to check that it stays readable. For background on what the code itself means, see HEX, RGB and HSL color codes explained.
Try it
Take a screenshot of the color you are curious about, drop it into the Color Palette Extractor and copy the HEX code of the matching swatch. Then paste it into the Color Name Finder to see the closest named color and how good the match is.