hex code to paint color

How to match a hex code to a real paint color

Share

You found the perfect sage green on Pinterest, copied its hex code, and now you want that exact color on your bedroom wall. Good plan.

Just know going in that a hex code describes light coming out of a screen, while paint is pigment sitting on drywall. Going from a hex code to paint color is a translation, and every translation loses a little.

This guide explains why the two never line up perfectly, how matching tools find the nearest real paint, what to check before you spend money on a gallon, and how to test a sample so the wall ends up close to what you had in mind.

Can you match a hex code to paint?

Yes, but only approximately. A hex code is a screen color, so no can of paint reproduces it exactly.

A matching tool converts the hex value into a color space built around human vision, compares it against the published values of real paint colors, and ranks them by color difference (Delta E).

Treat the closest match as a starting point. Check its LRV and undertone, then test a physical sample on your own wall before you buy.

The quickest way to get that shortlist is the Hex to paint color tool. Paste the code and you get the nearest paint colors, ranked.

Why screens and paint differ

A screen makes color by shining red, green and blue light at you. Turn all three up to full and you get white (#FFFFFF). Paint works the other way around. It absorbs part of the light that hits it and bounces the rest back to your eye, so the color you see depends on the light in the room as much as on the paint itself.

That one difference causes most of the trouble:

Your screen is not neutral. The same hex code looks warmer on a phone with Night Shift or True Tone switched on, brighter on a laptop at full brightness, and slightly different again on an office monitor with its own color profile. The code stays fixed. What you saw when you picked it did not.

Some screen colors have no paint equivalent. Electric cyan (#00FFFF) or a glowing neon pink comes from a backlight. Pigments can’t reflect that much light, so the nearest paint will look flatter. Deep, rich paint colors can go the other way and look muddy when a screen tries to show them.

Room light changes paint. A warm 2700K bulb pushes everything toward yellow. A north-facing room gets cool, bluish daylight that makes greys look colder. A south-facing room warms colors up through the afternoon.

Sheen changes paint too. The same color in flat and in semi-gloss won’t match, because glossy finishes reflect more light straight back and read slightly darker and richer at an angle.

Size matters. A color on a two-inch chip or a small square on your screen will look lighter and more saturated once it covers a twelve-foot wall. Designers call this the area effect, and it catches almost everyone the first time.

The hex code still earns its keep. It pins down the target, so you can measure how far each paint lands from it.

How closest-match works

Matching tools don’t compare hex codes as text, and they don’t compare raw RGB numbers either, because RGB distance doesn’t track how people see color. Two greens can be far apart in RGB and look almost identical, while two blues close in RGB look clearly different.

So the tool converts your hex code into CIELAB, a color space designed around human vision. Every color gets three values: L for lightness, a for the green-to-red axis, and b for the blue-to-yellow axis. Each paint in the database has its own Lab values, taken from the color data the manufacturer publishes.

Then it measures the distance between your color and every paint using a Delta E formula, usually CIEDE2000, which weights differences the way eyes notice them. A rough guide to reading the number:

  • Under 1: most people can’t spot a difference.
  • 1 to 2: visible only side by side, and only to a trained eye.
  • 2 to 5: noticeable when the two colors sit next to each other.
  • Over 5: you’re looking at a different color.

Use that number. If the best match comes back at 1.5, you’re in good shape. If the best match is 6 or higher, no paint in that brand sits close to your hex. Your options then are to check other brands, accept a near neighbor, or ask a store to custom-tint a color (more on that below).

Look at the top three or four results, not just the first. A match at Delta E 1.8 from one brand and another at 2.1 from a different brand are, for practical purposes, tied. Pick between them on LRV and undertone, then on price.

No hex code yet? If your inspiration is a photo of a room, the Palette from photo tool pulls the main colors out as hex codes.

Keep in mind that a photo has already been through a camera’s white balance and probably an editing filter, so the extracted hex reflects the photo, not the real wall. Sample a flat, evenly lit area of the wall rather than a spot in shadow or right next to a lamp.

Checking LRV and undertone of the match

Delta E tells you how close two colors are overall. It won’t warn you about the two things that most often make a wall look wrong once it’s up: how much light the color reflects, and which way it leans.

LRV (light reflectance value)

LRV runs from 0 (black) to 100 (a perfect white). It tells you what percentage of the light hitting a color gets bounced back. Most whites land somewhere between 80 and 94. Mid-tone greiges sit around 50 to 65. Anything under 50 absorbs more light than it reflects, so in a dim room it will go noticeably darker than the chip.

Use LRV against the room you’re painting. If your hex came from a sunny, professionally lit interior shot and you’re painting a hallway with one small window, the same color will look a step or two darker on your walls.

Picking the match with a slightly higher LRV often brings the result closer to the photo you loved. A bright south-facing room can handle the lower-LRV option without turning heavy.

Undertone

Two colors can sit close in Lab values and still lean in different directions. A greige might pull slightly green or slightly pink. A white might lean yellow, blue or grey. On a chip you barely notice it. On four walls next to oak floors and white trim, the lean shows.

Run each candidate through the Paint undertone finder before you order samples. Then compare that undertone with the things in the room you aren’t changing.

Orange-toned oak floors make pink-leaning beiges look pinker. Cool grey countertops make yellow-leaning whites look creamy, sometimes in a good way, sometimes not. If you have a physical chip, hold it against a sheet of plain printer paper.

The lean shows up much faster against a neutral white than against your current wall.

Getting a sample mixed

Once you have two or three candidates, get real paint in front of you. A hex code and a screen preview won’t settle it.

Take the brand’s color name and number from your match to the store or order online. Don’t bring the hex code and expect the store to match it. In-store spectrophotometers read physical objects, like a fabric swatch or a paint chip, not numbers.

A printed swatch also won’t help much, since home printers shift color as badly as screens do.

Order sample pots or peel-and-stick sample sheets of each candidate. Then:

  1. Paint each sample onto a white poster board, roughly 60 x 60 cm, with two coats. Painting straight onto your old wall color skews what you see, because the eye judges a color against its surroundings.
  2. Let it dry fully. Wet paint looks different from dry paint, and some colors shift noticeably as they cure.
  3. Move the boards around the room. Tape them near the window, in the darkest corner and next to the trim or floor.
  4. Check them in morning light, late afternoon light, and at night with your own lamps on. A color that works at noon can turn grey or yellow at 9 p.m.
  5. Live with them for two or three days before you decide.

If your best match came from one brand but you prefer another brand’s paint, most stores can tint their own base to approximate a competitor’s color. Expect a little drift, because the bases and pigments differ. If you go that route, sample the cross-brand version too. Don’t assume it matches the chip.

Common mistakes

Picking the color on your phone late at night. Warm display modes and low brightness change what you see. Look at the hex on a couple of screens in daylight before you commit to it.

Taking the first match without looking at the rest. The second or third result is often almost as close and a better fit for your room’s light.

Ignoring Delta E. A match at 7 is a different color with a similar name. If nothing comes in under 3 or 4, widen your search to more brands.

Skipping the undertone check. This is the most common reason a wall looks pink, green or yellow when the chip didn’t.

Testing a tiny patch on the old wall. Small swatches on a colored background give you the wrong read. Use big boards on a white background.

Judging under one light. Daylight and warm bulbs push the same paint in opposite directions. Check at least three times of day.

Changing the sheen after sampling. If you tested an eggshell sample, buy eggshell. A satin or semi-gloss version of the same color will look a touch different.

Expecting the wall to copy the photo. Your inspiration image had its own lighting and editing. Aim for the color in your room, not a recreation of somebody else’s.

Trust the boards over the screen

If the sample board on your wall and the hex code on your screen disagree, go with the board. The wall is what you live with. Paste your code into Hex to paint color to get the shortlist, and find the rest of the paint tools in the Paint & color hub.


Share

Similar Posts