Sub topic 18
ICC Profiles and Colour Management
Assume you know that an image stores channel values and that a colour space gives those values meaning. This chapter focuses on how software keeps that meaning consistent across cameras, monitors, printers, and image files.
Why pixel values need context
The RGB triplet (128, 64, 32) is not a complete description of a colour. It is only a set of numbers. The colour space determines which red, green, and blue primaries those numbers use and how the values relate to light.
For example, an image tagged as sRGB and an image tagged as Display P3 can contain identical RGB values but display different colours. Display P3 covers a wider range of colours, especially saturated reds and greens.
An ICC profile is metadata that describes the colour behaviour of an image space or device. ICC stands for International Color Consortium. A profile can describe an RGB colour space, a camera, a monitor, or a printer.
What colour management does
Colour management uses profiles to convert colours between devices. A colour management module, or CMM, usually converts through a Profile Connection Space (PCS), commonly CIE XYZ or CIE Lab.
The source profile says what the stored values mean. The destination profile says how to produce a similar colour on the output device. The CMM calculates the conversion.
A profile can be embedded in a file without changing the pixel values. The profile changes how software interprets those values. A colour conversion, in contrast, changes the pixel values so they represent the same intended colours in a new colour space.
| Action | Pixel values | Meaning |
|---|---|---|
| Assign a profile | Unchanged | Interpret existing values differently |
| Convert to a profile | Usually changed | Preserve appearance in a new colour space |
| Embed a profile | Unchanged | Store interpretation metadata in the file |
Embedding and reading profiles
PNG, JPEG, TIFF, and several other formats can carry ICC profile data. With Pillow, you can create an sRGB profile, embed it, and inspect it after reopening the file.
from PIL import Image, ImageCms
image = Image.new("RGB", (2, 2), (128, 64, 32))
srgb = ImageCms.createProfile("sRGB")
profile_bytes = ImageCms.ImageCmsProfile(srgb).tobytes()
image.save("tagged.png", icc_profile=profile_bytes)
reopened = Image.open("tagged.png")
embedded = reopened.info.get("icc_profile")
print(embedded is not None)
print(len(embedded) if embedded else 0)If software finds no profile, it must use an assumption. Many applications assume sRGB, but that assumption is not guaranteed. A missing or incorrect profile can cause muted, oversaturated, or shifted colours.
Practical decisions and failure modes
Keep an embedded profile when saving an image for another application. Convert to sRGB for systems that do not reliably honour wide-gamut profiles, such as some older web workflows. Keep a wider space such as Display P3 when the entire workflow supports it.
Printers need device-specific profiles because their inks, paper, and viewing conditions affect the result. Rendering intent controls how out-of-gamut colours are handled. Perceptual intent compresses the whole range, while relative colorimetric intent preserves in-gamut colours and clips colours outside the destination gamut.
Exercise
An image looks correct in one editor but oversaturated in another. What should you check first?
Show answer
Check whether the image has an embedded ICC profile and whether both applications honour it. Also check whether one application assigned a profile instead of converting the image.