Skip to content
universalImage Converter

Blog

Color Profiles and sRGB: Why Colors Can Shift When You Convert

A color profile tells software what the numbers in an image mean. When the profile is dropped or converted wrongly, the same numbers show different colors, which is the usual cause of a washed-out or over-saturated result.

By the Universal Image Converter Team

Numbers need a ruler

An RGB triple such as (230, 76, 51) says how much red, green and blue to mix, but not which red, green and blue. Different displays and cameras use different primaries, so the same triple can be a slightly different color. A color profile (an ICC profile, in the usual file-embedded form) names the space the numbers refer to.

sRGB is the common baseline: a standard from the late 1990s that the web assumes. An image with no profile is treated as sRGB by browsers. Display P3 is a wider space with more saturated reds and greens than sRGB can represent, and many recent phones and screens use it. A photo tagged P3 has numbers that only mean the right thing in P3.

A worked example: the same colors in two spaces

I converted some Display P3 colors to sRGB using the standard conversion matrices (linearize, matrix, re-encode, with each value rounded to a whole number, so treat each figure as accurate to plus or minus one). The numbers change; where the color fits inside sRGB, the color on screen does not.

ColorNumbers in the P3 fileSame color in sRGBWhat happens
Mid gray128, 128, 128128, 128, 128Neutrals pass through unchanged
Orange-red230, 76, 51249, 59, 33Numbers change, color is the same
Pure P3 red255, 0, 0255, 0, 0 (clamped)Redder than sRGB can show; nearest sRGB red used
Pure P3 green0, 255, 00, 255, 0 (clamped)Greener than sRGB can show; nearest sRGB green used

The orange-red row is the reason you cannot judge color by comparing numbers across profiles. The last two rows are the real cost of going to sRGB: colors outside its range are pulled to the nearest edge. For a pure P3 red, the linear sRGB value would need red at 1.225 and a slightly negative green and blue, which no sRGB screen can produce.

What the converter does with a tagged photo

The browser draws the picture onto an sRGB canvas, converting from the embedded profile as it goes; WebKit's own write-up on canvas color says the default stays sRGB and that drawImage performs any color space conversion needed. The tool then saves those pixels without embedding a profile. In effect, a P3 photo is converted properly to sRGB first and the profile tag is then omitted, which is correct because sRGB is what untagged images are assumed to be.

Two practical consequences follow. The converted file looks right in browsers and almost all other software, with colors matching the original wherever they fit sRGB. And the extra saturation outside sRGB (the last two rows above) is gone from the converted copy, which is invisible in most photos but can slightly flatten very vivid flowers, neon signs or saturated product shots on a wide-gamut screen. The profile and camera data that are dropped are listed in EXIF metadata and privacy when converting.

Diagnosing colors that went wrong

How big the gamut gap is

You can put a number on the difference between the two spaces. On the standard CIE xy chromaticity diagram, sRGB's three primaries form a triangle of area 0.1121 and Display P3's form one of 0.1520, so P3's triangle is about 36 percent larger. That figure is geometry, not perception: other measures give other percentages, and no single number describes how much more color you will see. The practical point is simpler. The extra area sits at the saturated corners (reds and greens), exactly where a clamp in the table above has to happen.

A profile itself is small. The minimal sRGB profile that Pillow builds is 588 bytes, and a profile embedded in a photo is typically somewhere between a fraction of a kilobyte and a few kilobytes, so dropping it never explains a large change in file size; it only changes what the pixel numbers mean.

Choosing sRGB on purpose

For anything seen on screens (web pages, email, chats, upload forms), sRGB is the right target because it is the one space every viewer handles. Treat it as the delivery space, not a downgrade. Where color accuracy is critical, as in photographs sent for professional printing, work in your editing software with the correct profile and export the way the printer asks; printers can convert from sRGB, but some want their own profile or a specific one, as discussed in best image formats for printing.

A scenario shows how this plays out. A product photographer shoots in a wide-gamut space and delivers two things: a high-quality master with the profile embedded for the print shop, and a web copy converted to sRGB for the store page and for email. Nobody has to guess what the numbers mean in either file. The mistake to avoid is making the web copy by only deleting the profile tag, which leaves wide-gamut numbers pretending to be sRGB and produces exactly the dull greens and reds described above.

When pictures come from an iPhone, the capture format and its color settings are covered in iPhone photo formats; for converting, the point is only that a P3-tagged photo ends as sRGB. A quick sanity check after conversion: open the original and the copy next to each other, look at the most saturated area, and decide if you can see the difference at the size the picture will be used. If you cannot, nothing needs fixing.

Need sRGB output? Convert your photo in the converter and compare the result with the original in your browser.

Open the image converter