Mistakes, measured

Get a hex color from an image and check it against your logo

Updated Tool run November 25, 20264 logo pictures, 3 photosNo brand file from a real company used

Eyedropper over swatches, text "Get a hex color from an image. Pick brand colors and check the match"

Short answer

Ask the free palette tool for 3 colors on a 3-color logo and you get only two of them: the teal #17BEBB came back as #E3F7F7. Choose your logo file, set the count to at least one more than the logo's colors (for the background), and read the hex code beside each swatch. On the flat PNG test file the three codes came back exactly; a small or compressed file gave codes within 1.5 CIEDE2000 at the default 6 colors (1.88 at 4). A photo of a logo has no single hex, so use the logo file itself.

Pull hex colors from a picture (free, in your browser, no upload)

Key takeaways

  • Our suggestion: ask for at least one more color than the logo has. On the flat logo, 4 colors and 6 colors both gave the three logo hex codes exactly (the default 6 did as well as 4 on every file we tried); 3 colors lost the teal (#17BEBB came back as #E3F7F7, a CIEDE2000 difference of 24.62). Logos with more than 3 colors were not tested.
  • A small or compressed logo gives a hex that is close, not identical: the worst of the three logo colors was 1.50 CIEDE2000 away on a 200 px JPEG at the default count (1.88 at 4 colors), 0.97 on a noisy JPEG screenshot and 0.00 on the flat PNG.
  • Swatches with a tiny share (0.2% and 0% on the flat logo) look like blends from the edges (anti-aliased edges and the tool's shrink to 320 px; we did not separate the two), not logo colors.
  • A photo has no true hex: the red sculpture in the photo came back as reds from #7F0303 to #EF1608; our reading is shade, mid-tone and highlight, and lighting was not tested. Use the original logo file, not a photo of it.
  • Check readability before you use the hex for text: the orange #E4572E on white reads 3.68:1, under the 4.5:1 that WCAG 2.2 asks for normal text.

The steps, in one minute

You have a logo or a picture and no list of brand colors. The Koldflux palette tool runs in your browser, so the picture stays on your device (the tool page says nothing is uploaded).

  1. Open the palette tool and choose your picture. The tool shows the picture size and the number of colors it found.
  2. Under "Number of colors" pick at least one more than your logo's colors, for the background (our suggestion; the default 6 also worked on every file we tried). A logo with three colors on white needs at least 4.
  3. Read the swatches. Each shows a hex code and its share of the picture. The large shares are your logo colors and the background.
  4. Click a swatch to copy its hex. The page also lists them as CSS variables.
  5. If you have the brand's official hex, compare it with the one you got using the script in the last mistake below.

Free tool:Pull hex colors from a picture (free, in your browser, no upload)

The Koldflux palette tool after loading a 200 by 150 pixel logo: six swatches, white 64.6%, orange #E3572D, teal #1FBEBC, dark #2D292A and two small blend swatches
The tool on the small JPEG logo: four logo and background swatches, two small blends.

Mistake 1: asking for fewer colors than the picture has

The tool's default is 6 colors, and the menu offers 3, 4, 5, 6, 8 and 10. We drew one flat logo with three colors on a white background, #E4572E orange, #17BEBB teal and #2E282A dark, and ran the same file three times, changing only the number of colors. Four distinct colors need at least 4.

At 6 and at 4 the three logo hex codes came back exactly (CIEDE2000 0.00). At 3, the teal was gone: the tool returned #E3F7F7, a pale teal covering 74.1% of the picture, which is the white and the teal merged. The orange moved by 0.20, to #E4582F, and the dark did not move.

The same thing happened on the other three logo pictures at 3 colors: the nearest returned color to the teal was 24.40 away on the small JPEG, 23.38 on the noisy JPEG and 21.26 on the gradient background. The table in the figure further down shows the 3-color row for the flat file.

What the test shows: with this logo, the same file and only the count changed, 3 lost a logo color and 4 and 6 did not. The default 6 was as good as 4 on every file, and better on the small JPEG (worst difference 1.50 against 1.88), so leaving the default would also have worked here; the "one more than the logo" rule is our suggestion from one logo with three colors. It does not show how the tool behaves on a logo with more than 3 colors (the menu also offers 5, 8 and 10; none was tried on a logo) or on a background that is not white.

Mistake 2: copying a tiny swatch as if it were a logo color

At 6 colors on the flat PNG the tool gave the three logo colors, the white, and two more swatches: #F1A792 with a share of 0.2% and #6E696B at 0%. Those look like blends: anti-aliased edges leave a thin line of in-between pixels between the orange and the white, and the dark and the white, and the tool also shrinks the picture to 320 px wide, which blends edges too (the tool page says so). We did not separate the two causes. The script counted 375 distinct colors in the flat file, though only four are in the design.

Read the shares. A real logo color covers a visible area; in that file the three logo colors were 18.8%, 9.1% and 7%. The blend swatches in our runs were 0.2% and 0% (flat PNG), 1.3% and 0.3% (small JPEG), 0.3% and 0% (noisy JPEG) and 0.2% (gradient), so the largest was 1.3% (#D5856F, small JPEG), while the logo colors were 6.9% and above (the dark one in the small JPEG). So a swatch under about 1% is probably an edge, but "about 1%" is only our suggestion, and 1.3% was a blend in one file.

A background that is not flat splits too. On the logo over a light gray gradient, the 6-color run showed the three logo colors exactly and spent two of the other swatches on the background (#EDEEF1 at 38.9% and #D7DBE1 at 26.1%).

Mistake 3: expecting the exact hex from a small or compressed file

The flat 800 × 600 PNG returned the three hex codes with a difference of 0.00. A real logo from a web page is often a small JPEG or a screenshot, so we made two such files from the same drawing: a 200 × 150 JPEG at quality 50 (made by shrinking the drawing and compressing it) and an 800 × 600 JPEG at quality 60 with random noise added (sigma 10). The tool returned hex codes that are close, not identical.

Hex returned for each logo file
Logo fileOrange (true #E4572E)Teal (true #17BEBB)Dark (true #2E282A)
Flat PNG, 800 × 600#E4572E, 0.00#17BEBB, 0.00#2E282A, 0.00
Small JPEG, 200 × 150#E3572D, 0.30#1FBEBC, 0.45#2D292A, 1.50
Noisy JPEG, 800 × 600#E0552C, 0.97#17BBB7, 0.90#2D2729, 0.32
Logo on gray gradient, PNG#E4572E, 0.00#17BEBB, 0.00#2E282A, 0.00

Each cell is the hex returned at the tool's default 6 colors and its CIEDE2000 difference from the true hex (the figure below shows the same numbers). About 1 is a just noticeable difference, a statement the tool page makes about that scale; the 1.50 for the dark on the small JPEG is the largest among the logo colors here. These three files differ in size, compression and noise together, so the table describes these file profiles and does not isolate the effect of one of them. The tool works on a copy shrunk to 320 px wide, so the 200 px JPEG was not shrunk and the three 800 px files were; that also differs between rows. The tool page's own JPEG test (five large flat areas) says compression "did not hurt" and shows 0.00; our logo has thin shapes and the small JPEG shows up to 1.50, so that statement does not carry over to a logo like ours.

So if the hex from a small file is off by a digit or two, that is expected. Whether it matters depends on how close your brand must be; for a brand list, get the larger or vector file from whoever made the logo.

Three true logo colors against what the palette tool returned on five logo pictures, with the CIEDE2000 difference; the 3-color request on the flat PNG returned #E3F7F7 for the teal, difference 24.62
True logo colors against the hex returned, with CIEDE2000 differences.

Mistake 5: using the hex for text without a contrast check

The three hex codes of the logo, as text on white, by script: orange #E4572E 3.68:1, teal #17BEBB 2.30:1, dark #2E282A 14.45:1. WCAG 2.2 success criterion 1.4.3, read on November 25, 2026, says: "The visual presentation of text and images of text has a contrast ratio of at least 4.5:1" with an exception for large-scale text, which needs 3:1. So the orange on white passes only as large text, and the teal fails both.

The same page says: "Logotypes Text that is part of a logo or brand name has no contrast requirement." That is about the logo itself. A caption or thumbnail line written in the brand color is ordinary text. The brand color contrast guide checks a color pair against both limits and shows the nearest shade that passes.

Compare your hex with the brand's official one

If your logo came with a brand guide, check what the tool returned against the official hex. Download hex-distance.cjs (a script with no other files). Pass it two hex codes; it prints their CIEDE2000 difference, the same scale used above.

It accepts three or six hex digits, with or without the hash sign, and strips a Windows line break. On a missing argument, an empty string, text that is not hex and non-ASCII text it stops with a message and exit code 2. It was run on the test pair and 9 other inputs (commands.log), and on Node.js 24 only. It ignores a third argument and removes spaces inside a value.

How we measured: ΔE is computed by a script, not by the tool, and the script was checked against published test pairs (Sharma, Wu and Dalal, 2005) and a known red (all in the log) before any number was used.

node hex-distance.cjs "#E4572E" "#E3572D"
Needs Node.js. Prints: #E4572E vs #E3572D: CIEDE2000 = 0.30

Free tool:Download hex-distance.cjs (Node.js script, compares two hex codes)

Limits of this test

What was run

The Koldflux palette tool page and the W3C WCAG 2.2 page were read. The tool was run in headless Chromium on 4 pictures of one drawn logo (3 colors plus white), 3 CC0 photos and 1 crop, and computed every ΔE and contrast figure by script with controls: the published test pairs, a red whose Lab value is known, black on white at 21:1, a fake magenta swatch that matched 0.0% of the flat logo's pixels, and the flat logo, where the share of pixels near each swatch matched the tool's share.

What it does not show

One drawn logo, one browser, one day. No phone, HEIC file or real company logo was used, and logos with gradients or shadows were not tested, so their hex is a choice and not a measurement. We cannot say whether your logo file is your brand's official color: ask the maker for the brand guide. Photos were used only to show how swatches behave; no true hex exists for them.

Do it in your browser

Free Koldflux tool, no account needed.

Pull hex colors from a picture (free, in your browser, no upload)

Questions people ask

How do I get the hex color from an image?

Choose the picture in the free palette tool, set the number of colors to at least one more than the logo has (for the background), and read the hex code on each swatch.

How many colors should I ask for?

Our suggestion is at least one more than the logo has, for the background. In the test, 4 and 6 colors both gave the three logo colors of a 3-color logo on white (exact on the flat PNG), while 3 colors lost the teal; the default 6 worked as well. Logos with more than 3 colors were not tested.

Why is the hex slightly different from my brand color?

The picture is probably small or compressed. On the 200 px JPEG the hex was off by up to 1.50 CIEDE2000 at the default 6 colors (1.88 at 4); on the flat PNG it was exact.

Can I get the exact hex from a photo of my logo?

No single hex exists in a photo: a photo gives several colors for one painted surface (three reds, 10.63 to 23.06 apart, in the crop, which look like shade, mid-tone and highlight; lighting was not tested). Use the logo file.

Is the picture uploaded anywhere?

The tool page says the picture stays in your browser and nothing is uploaded. We did not inspect network traffic.

Is my brand color readable as text?

Check it: WCAG 2.2 asks for 4.5:1 for normal text and 3:1 for large text. The orange #E4572E on white is 3.68:1.

Related

More guides on this topic

Sources and how we checked

  1. Koldflux palette from an image (Koldflux tool, run November 25, 2026) (checked 2026-11-25)
  2. W3C: Web Content Accessibility Guidelines 2.2, success criterion 1.4.3 Contrast (Minimum) (W3C Recommendation 12 December 2024, read November 25, 2026) (checked 2026-11-25)
  3. Koldflux test log: controls, logo pictures, photos, crop, contrast (Koldflux measurement, November 25, 2026) (checked 2026-11-25)
  4. Commands log: hex-distance.cjs on the test pair and edge inputs (Koldflux) (checked 2026-11-25)
  5. hex-distance.cjs: CIEDE2000 between two hex codes (Koldflux, Node.js) (checked 2026-11-25)
  6. make.cjs: builds the four logo pictures (Koldflux, Node.js with sharp) (checked 2026-11-25)
  7. run.cjs, crop.cjs, lib.cjs and shot-tool.cjs: drive the tool and compute ΔE and contrast (Koldflux, Node.js with Playwright) (checked 2026-11-25)
  8. Photo sources: titles, authors, CC0 licence and checksums of the three test photos (Koldflux) (checked 2026-11-25)

On November 25, 2026 the Koldflux palette tool was driven in headless Chromium with Playwright. Four pictures were made with sharp from one drawing of a flat logo with three known hex codes (#E4572E, #17BEBB, #2E282A) on white: a flat 800 × 600 PNG, a 200 × 150 JPEG at quality 50, an 800 × 600 JPEG at quality 60 with Gaussian noise of sigma 10, and the PNG on a gray gradient. Each was run at 6 colors, 4 colors and 3 colors, and the nearest returned hex to each true hex was compared by CIEDE2000, computed by the script and checked against the Sharma, Wu and Dalal 2005 test pairs, a red with a known Lab value and a same-color control. Three CC0 photos from Wikimedia Commons were run at 3, 6 and 10 colors and each swatch was compared with the pixels of a 320 px wide copy; the same metric on the flat logo and with a fake swatch served as controls. A crop of the red part of one photo was run at 3 and 6 colors. WCAG contrast ratios were computed by script (black on white read 21.00:1) and the success criterion text was read on w3.org. hex-distance.cjs was run on a test pair and 9 other inputs (commands.log). No phone, brand file or account was used.