Skip to content
PaletteViva

Why your picked hex code does not match Photoshop

You sampled a colour from a photo, pasted the hex into Photoshop, and it looks wrong. Nothing is broken — you have met the difference between sRGB and Display P3.

The short answer

Most modern phones photograph in Display P3, a colour space wider than sRGB. It can describe reds, greens and cyans that simply do not exist in sRGB. When a tool that only understands sRGB reads one of those pixels, it has to approximate: it reports the nearest colour it can represent, which is not the colour that is actually in the file.

Two tools can disagree for a second reason as well — whether they colour-manage the embedded ICC profile at all. A tool that ignores the profile and reads raw bytes is reporting a different colour from a tool that converts properly.

How to tell whether this is your problem

Open the image in PaletteViva. If the file carries a wide-gamut profile, the colour panel says so, and when the pixel you sampled falls outside sRGB you get a note that the hex value is a clipped approximation, along with the original value in the color(display-p3 …) notation that CSS understands natively.

If you see that note, the hex code is still correct — it is the sRGB rendering of that colour, which is what you need for screens that cannot show anything wider. What you must not do is treat it as the original colour and convert it again later, because every conversion into a narrower space loses information permanently.

What to do about it

  • For web work, use the sRGB hex. It is what the vast majority of screens will render, and it is what CSS expects unless you opt into a wider space.
  • For modern CSS, you can use the P3 value directly. color(display-p3 …) is supported in current browsers, and on a wide-gamut display the result is visibly more saturated. Provide an sRGB fallback declaration first so that older browsers get a sensible colour rather than nothing.
  • For print, convert from the original file. A P3-to-CMYK conversion needs a real ICC profile for the specific press and paper. The CMYK figures shown in colour tools — ours included, and it says so — are naive arithmetic conversions and are not a substitute for a proper separation.
  • When you need exactness, ask for the asset. If a client sends a photograph and you need their brand colour, the reference is the brand guide, not a screenshot.

A second, subtler trap: sampling a resized canvas

There is another reason online colour pickers report the wrong value, and it has nothing to do with colour spaces. Most of them sample the image as displayed. If the picture is scaled down to fit your screen, every screen pixel is a blend of several image pixels, so the value you get is a mixture that exists nowhere in the file. Zoom into some text in a screenshot and sample it: a tool that reads the display canvas will report an anti-aliasing blend, while one that reads the source data reports the actual text colour.

PaletteViva keeps a separate full-resolution buffer for sampling and reads it by pixel index, so what you copy is what is in the file. The magnifier is drawn from that same buffer and shows the individual pixels with a grid, which is how you confirm you are on the pixel you meant before locking the value.

The one-line version

A hex code is only meaningful alongside the colour space it belongs to. Phones shoot wider than sRGB, screens vary, and tools differ in how honestly they handle both. Being told which case you are in is worth more than being given a number with no caveats.

Sample a colour from an image and see what the panel reports . If you want the formats themselves — hex, RGB, HSL, OKLCH — rather than the colour-space question, read HEX, RGB, HSL and OKLCH explained . And for how a whole palette is derived from an image, see how palette extraction works .