Sub topic 11
ICC profiles and rendering intents
This chapter assumes you know the following:
- RGB and CMYK as models for screen and print.
- What a colour space and a gamut are.
- The idea that sRGB values are non-linear.
- The basics of the naive RGB-to-CMYK formula and why it is only an approximation.
Here you will learn what the thing that replaces that formula, the ICC profile, contains. You will also learn what the four rendering intents do and how to apply them in a real conversion.
Why numbers alone are not colours
The triple 255, 136, 0 is not a colour until you say which device or space it belongs to. On an sRGB monitor it is one orange. On a wide-gamut Display P3 screen it is a slightly more saturated orange. Treated as ink percentages, 255 is not even valid.
The same holds in CMYK. 0, 50, 100, 0 printed on glossy coated paper looks different from the same numbers on newsprint.
An ICC profile is a small file, usually with the extension .icc or .icm, that describes how one device or colour space turns its numbers into real, measurable colour. The format is maintained by the International Color Consortium. A profile contains:
- A header with the profile class (display, input, output), the colour space of the device values (RGB, CMYK, Gray), and the version.
- Tags holding the data that links device values to a device-independent colour.
- A description string, which is the name you see in a software menu, such as "sRGB IEC61966-2.1" or "Coated FOGRA39".
The profile connection space
Converting directly between every pair of devices would need a separate recipe for each pair. ICC avoids this with a shared middle layer called the profile connection space (PCS). The PCS is a device-independent description of colour, either CIE XYZ or CIE Lab. It is defined relative to a D50 white point (a slightly warm "daylight" white).
Each profile only needs to answer two questions:
- Device values to PCS: what real colour does this RGB or CMYK number produce?
- PCS to device values: which numbers on this device produce this real colour?
A conversion chains two profiles through the PCS. A program called a colour management module (CMM) does the arithmetic. Photoshop, Affinity, browsers, operating systems and libraries such as LittleCMS all contain one.
How a profile stores its knowledge
Profiles use two main structures.
Matrix/TRC profiles are typical for monitors and RGB working spaces. They hold three tone curves (the tone reproduction curve, TRC, which describes the gamma behaviour from the sRGB chapter), plus a 3×3 matrix that maps the linearised RGB to XYZ. They are small, often a few kilobytes, and the maths is simple. The sRGB profile is of this kind.
LUT-based profiles use lookup tables, called A2B (device to PCS) and B2A (PCS to device). CMYK printing needs these. Ink on paper behaves in ways a matrix cannot describe: dot gain, ink overprint, paper tint, and the black ink interacting with the other three. Profile makers print a test chart with known CMYK patches, measure each patch with a spectrophotometer, and build the tables from the measurements.
LUT-based output profiles usually carry several tables, one per rendering intent. That is why the intent you choose changes the result.
The four rendering intents
Printing gamuts are smaller than screen gamuts, so some colours in the source have no equivalent in the destination. A rendering intent is the rule for what to do with them. ICC defines four.
| Intent | What it does | Typical use |
|---|---|---|
| Perceptual | Squeezes the whole source gamut into the destination gamut, so relationships between colours are kept. In-gamut colours also shift slightly. | Photographs, especially with many saturated colours |
| Relative colorimetric | Maps the source white to the destination white (the paper). Colours inside the gamut stay exact. Colours outside are clipped to the nearest reproducible colour. | Default for most design and proofing work, logos, flat colour |
| Saturation | Keeps colours vivid and does not try to stay accurate. | Charts and business graphics, rarely photos |
| Absolute colorimetric | Like relative, but the source white is not adapted. The paper's tint is reproduced, so white can be slightly yellow. | Proofing, simulating one paper or press on another |
Some points about the table need explaining.
- Clipping versus compression. Relative colorimetric keeps in-gamut colours exact but can merge two different out-of-gamut colours into the same printable colour, which flattens detail in vivid areas. Perceptual avoids that by shifting everything a little, at the cost of slightly duller in-gamut colours.
- Perceptual is not standardised. ICC specifies the goal, but each profile maker decides how the compression works. Two perceptual CMYK profiles can give different results.
- Matrix profiles have no intent tables. When both the source and the destination are matrix profiles, such as sRGB to Adobe RGB, perceptual and relative colorimetric give almost the same result. The choice matters when a LUT-based profile, typically CMYK, is involved.
Black point compensation
Black point compensation (BPC) is a setting rather than an intent. It scales the source's darkest black to the destination's darkest black. A monitor can show near-zero luminance, but ink on coated paper cannot get that dark. Without BPC, relative colorimetric clips all the dark shadow tones into one flat black. With BPC, shadow detail survives. It is normally on for relative colorimetric. Perceptual already handles black in its tables.
Tagged, untagged, assign, convert
Two ideas cause most profile mistakes.
An image is tagged when a profile is embedded in the file. An untagged image has numbers but no stated meaning. Software then guesses, usually that it is sRGB for RGB files, or some default CMYK.
Software offers two operations on a profile, and they are very different:
- Assign (or "tag as") changes the meaning of the numbers and leaves the numbers alone. The picture will look different on screen. Use it when the file was tagged wrongly or not at all and you know its true space.
- Convert (or "transform") keeps the appearance as close as possible and changes the numbers. Use it to move from one space to another, such as sRGB to FOGRA39.
A frequent error is assigning a CMYK profile to an RGB file's numbers or assigning sRGB to a Display P3 image. The colours look dull or oversaturated, and the numbers are no longer recoverable by simple conversion.
Doing a conversion in code
Python's Pillow library exposes LittleCMS through ImageCms. The script below inspects any embedded profile and then converts an image to CMYK with an explicit intent. It assumes you have downloaded a CMYK profile for your press, such as Coated FOGRA39 or a profile supplied by your printer. Pass its path on the command line.
import io
import sys
from PIL import Image, ImageCms
def describe_embedded_profile(img):
data = img.info.get("icc_profile")
if not data:
return None
profile = ImageCms.ImageCmsProfile(io.BytesIO(data))
return ImageCms.getProfileDescription(profile).strip()
def to_cmyk(src_path, cmyk_profile_path, dst_path):
img = Image.open(src_path)
embedded = describe_embedded_profile(img)
print("Embedded profile:", embedded or "none, assuming sRGB")
if embedded:
src_profile = ImageCms.ImageCmsProfile(
io.BytesIO(img.info["icc_profile"])
)
else:
src_profile = ImageCms.createProfile("sRGB")
dst_profile = ImageCms.getOpenProfile(cmyk_profile_path)
out = ImageCms.profileToProfile(
img.convert("RGB"),
src_profile,
dst_profile,
renderingIntent=ImageCms.Intent.RELATIVE_COLORIMETRIC,
outputMode="CMYK",
flags=ImageCms.Flags.BLACKPOINTCOMPENSATION,
)
out.save(dst_path, icc_profile=dst_profile.tobytes())
print("Saved", dst_path)
if __name__ == "__main__":
to_cmyk(sys.argv[1], sys.argv[2], sys.argv[3])Run it as python to_cmyk.py photo.jpg CoatedFOGRA39.icc photo_cmyk.tif. Notice three details:
- The source profile comes from the file when present, and falls back to sRGB only when absent. The fallback is an assumption you should state to your team.
- The intent and BPC flag are explicit, not left to defaults.
- The result is saved with the destination profile embedded, so the next program knows what the CMYK numbers mean.
Soft proofing and gamut warnings
Before sending a file to print, you can preview it on screen. Soft proofing applies a transform from your image to the print profile and back to the display, so you see roughly how the printed colour will look. Design applications let you switch this on, choose the intent, and optionally enable simulate paper colour (which uses absolute colorimetric for the preview) and simulate black ink.
A gamut warning overlays a flat colour on pixels that the destination cannot reproduce. Use it as a guide, not as the full picture. The warning says nothing about how far a colour falls outside the gamut, and a pixel just beyond the edge is usually harmless.
Common errors
- Ignoring embedded profiles when exporting for the web. Stripping a profile from a Display P3 image makes browsers treat it as sRGB, so colours look flat. Convert to sRGB before stripping.
- Converting twice. Going RGB to CMYK to RGB leaves the image permanently clipped. Keep the original RGB master and convert copies.
- Using a generic CMYK profile. A profile built for coated paper applied to an uncoated job gives wrong ink totals and a muddy or too-bright result. Ask the printer which profile to use.
- Forgetting total ink limit. Heavy shadows may exceed the press's total area coverage, often around 300% on coated stock and lower on uncoated. A correct press profile limits this for you. The naive formula does not.
- Mixing intents without noticing. Application defaults differ, and some browsers and exporters use perceptual or relative colorimetric silently. State the intent in your handoff notes.
- Treating a conversion as reversible. Colours clipped at a gamut edge cannot be restored by converting back.
Choosing quickly
- The destination is a web page or app: convert to sRGB (or Display P3 where you know the audience has capable screens), embed or assume the profile, and don't use CMYK.
- The destination is a press with a known profile: work in RGB, convert once at the end using that profile, choose perceptual for photographs and relative colorimetric with BPC for flat colour, and soft proof first.
- The destination is a proof that must mimic another press: use absolute colorimetric with paper simulation.
Exercise
A designer opens an untagged RGB photo that looks flat and grey. They choose "Convert to Profile" and select Adobe RGB (1998). The photo looks the same as before, but its file values changed. Then they choose "Assign Profile" and select Adobe RGB (1998) on a different, untagged copy, and the photo suddenly looks more vivid. Explain what each operation did, and say what the designer should check before choosing either.
Show answer
Convert kept the appearance and recalculated the numbers from the assumed source space to Adobe RGB, so the image looks the same with different values. Assign kept the numbers and changed the meaning, so the same values are read as Adobe RGB, which has a wider gamut and renders them more saturated. The designer should find out which space the photo was really captured or exported in. If it was truly Adobe RGB, assign is correct. If it was sRGB, assign sRGB and then convert if a different working space is needed.
Exercise
You must convert a brand logo with flat, highly saturated orange and a dark navy to CMYK for a coated-paper press. Which rendering intent and setting would you choose, and why? What would you change for a photograph with large areas of saturated colour?
Show answer
Use relative colorimetric with black point compensation. Flat brand colours that are in gamut stay exact, and BPC keeps the navy from collapsing into pure black. For a photograph with large saturated areas, try perceptual, because compressing the whole gamut keeps the differences between neighbouring out-of-gamut colours that clipping would merge.
Exercise
Why do perceptual and relative colorimetric give nearly the same result when converting from sRGB to Adobe RGB (1998)?
Show answer
Both profiles are matrix/TRC profiles with no per-intent lookup tables. The intent only selects between tables in LUT-based profiles, so there is little for it to change. The remaining difference is in how black point compensation is applied.