Sub topic 4
The profile connection space and the colour management module
This chapter assumes you know what an ICC profile is and why RGB and CMYK numbers are device-dependent. It explains how a profile converts numbers into real colours and back. That conversion decides what happens to your file when you change colour modes or export for print.
The problem: converting without a common reference
Say you have an RGB photo and want to print it on a press. The RGB values describe a monitor or a working space. The CMYK values describe ink on a specific paper. There is no direct formula between them. If every device needed its own conversion to every other device, you would need a separate table for each pair.
ICC colour management avoids this by routing every conversion through one shared reference.
The profile connection space
The profile connection space (PCS) is a device-independent colour space that sits between any two profiles. The ICC specification allows two PCS options:
- CIE XYZ, which models colour as human vision measures it.
- CIE Lab, which is perceptually more even, so equal numeric steps look like roughly equal colour differences.
Each profile contains tables or formulas that map its device numbers to the PCS (the "A to B" direction) and from the PCS back to device numbers (the "B to A" direction). A profile therefore only needs to know about its own device and the PCS. It never needs to know about the other device.
The colour management module
The colour management module (CMM) is the software engine that does the maths. Photoshop, InDesign, Affinity apps, your operating system and libraries such as LittleCMS all include one. When you convert, the CMM:
- Reads the source profile and turns the source numbers into PCS values.
- Applies the chosen rendering intent to handle colours the destination cannot reproduce.
- Reads the destination profile and turns the PCS values into destination numbers.
Seeing it in code
The Pillow example below converts an image from its embedded profile to a press profile. The CMM (LittleCMS) does steps 1 to 3 behind one function call.
import io
from PIL import Image, ImageCms
im = Image.open("photo.jpg")
src = ImageCms.ImageCmsProfile(io.BytesIO(im.info["icc_profile"]))
dst = ImageCms.getOpenProfile("press_profile.icc")
out = ImageCms.profileToProfile(
im,
src,
dst,
renderingIntent=ImageCms.Intent.RELATIVE_COLORIMETRIC,
outputMode="CMYK",
flags=ImageCms.Flags.BLACKPOINTCOMPENSATION,
)
out.save("photo_cmyk.tif", icc_profile=dst.tobytes())You never see the PCS values. The two profiles and the intent are your only inputs.
Common errors
- Assuming CMMs are interchangeable. Different CMMs can give slightly different results from the same profiles. Use the same engine (for example Adobe ACE) across your team when you compare conversions.
- Expecting a round trip to restore the original. Converting RGB to CMYK and back loses information, because out-of-gamut colours were already clipped or compressed.
- Converting without a source profile. The CMM then has no way to reach the PCS correctly. It must guess, usually by assuming sRGB.
Exercise
Why does ICC colour management route conversions through a profile connection space instead of converting directly between devices?
Show answer
Each profile only has to describe how its own device relates to the PCS. Any two profiles can then be combined through the PCS, so you do not need a separate conversion table for every pair of devices. The CMM performs the source-to-PCS and PCS-to-destination steps.