Sub topic 8
Rendering intents and how out-of-gamut colours are handled
This chapter assumes you know what an ICC profile is, how the profile connection space (PCS) links two profiles, and what gamut means. It also assumes you have converted an image between RGB and CMYK in an editor. If any of that is unfamiliar, review the earlier chapters on gamut, ICC profiles and the PCS first.
The problem a rendering intent solves
Every conversion sends colour values from a source profile into the PCS and out through a destination profile. Often the destination cannot reproduce a source colour. A saturated sRGB green or an electric blue usually falls outside a coated-paper CMYK gamut. The profiles do not say what to do with such a colour. The rendering intent is the instruction that decides it.
You choose the intent when you convert, and the colour management module (CMM) applies it. The intent decides three things:
- how colours inside the destination gamut are treated;
- how colours outside it are brought in;
- whether the white of the source is mapped to the white of the paper.
The four intents
| Intent | Out-of-gamut colours | White point | Typical use |
|---|---|---|---|
| Perceptual | The whole range is compressed, so in-gamut colours also shift | Source white maps to destination white | Photographs with many saturated colours |
| Relative colorimetric | Clipped to the nearest reproducible colour | Source white maps to paper white | Most print conversions, and logos or brand colours |
| Saturation | Pushed to keep vividness, not accuracy | Varies by profile | Charts and business graphics |
| Absolute colorimetric | Clipped, as in relative colorimetric | Not adapted; paper white is simulated | Proofing only |
Perceptual
Perceptual rendering shrinks the source gamut to fit the destination, so colour relationships survive. Two similar greens that would both clip to the same value stay distinguishable. The cost is that colours already inside the gamut also move, usually a little less saturated. How much they move is decided by the profile maker. The ICC specification does not fix an exact algorithm for the perceptual table.
Relative colorimetric
Relative colorimetric leaves in-gamut colours alone. Colours outside the gamut are clipped to the nearest colour the destination can print. The source white point is scaled to the paper white, so a pure white file does not print as ink-coloured tint. Two out-of-gamut colours that are close in the source can end up identical. This is called clipping, and it shows up as flat patches in saturated skies or flowers.
Saturation
Saturation keeps vivid colours vivid and does not preserve accurate hue relationships. It suits flat graphics, and it is rarely right for photographs or brand colours. Many profiles implement it the same way as perceptual, so the result may match perceptual.
Absolute colorimetric
Absolute colorimetric also clips out-of-gamut colours, but it does not move the white point. Source white stays as the colour of the source white, which means the printed or simulated result carries the tint of the paper. This is why it is used to simulate one paper on another. For a final press conversion it adds a unwanted colour cast to the white areas.
Which profiles have which intents
An intent only works if the profile contains a table for it. Matrix and curve profiles, such as sRGB and Adobe RGB, describe colour with a simple matrix and tone curve. They have no separate perceptual table, so perceptual and relative colorimetric give the same result for them. Lookup-table profiles, such as most CMYK press profiles, carry separate tables and can give different results for each intent.
This produces two common effects:
- Choosing perceptual when the destination is a matrix RGB profile makes no visible difference.
- Choosing perceptual for a CMYK press profile gives a different result from relative colorimetric.
ICC version 4 profiles define the perceptual intent against a reference medium, and version 2 profiles do not. A v2 and a v4 profile may therefore render perceptual differently even if both come from the same press. Check which version your profile uses when results look inconsistent.
Choosing an intent
A practical default is relative colorimetric with black point compensation (covered in the next chapter). Switch to perceptual when the soft proof shows clipped detail in a photograph. Test both on the actual image, because the right choice depends on how much of it is out of gamut.
Brand colours deserve special mention. A spot or brand colour outside the CMYK gamut cannot be matched by any intent. Relative colorimetric gives the closest reproducible colour, which is the honest result. Perceptual would shift the colour and its neighbours.
Comparing intents in code
This script converts four test colours from sRGB to a CMYK press profile with each intent and prints the CMYK values. It assumes you have a file called press_profile.icc, a lookup-table CMYK profile for your press or printer.
from PIL import Image, ImageCms
colours = [(0, 255, 0), (0, 0, 255), (128, 128, 128), (255, 255, 255)]
im = Image.new("RGB", (len(colours), 1))
im.putdata(colours)
srgb = ImageCms.createProfile("sRGB")
press = ImageCms.getOpenProfile("press_profile.icc")
intents = {
"perceptual": ImageCms.Intent.PERCEPTUAL,
"relative": ImageCms.Intent.RELATIVE_COLORIMETRIC,
"saturation": ImageCms.Intent.SATURATION,
"absolute": ImageCms.Intent.ABSOLUTE_COLORIMETRIC,
}
for name, intent in intents.items():
out = ImageCms.profileToProfile(
im, srgb, press, renderingIntent=intent, outputMode="CMYK"
)
print(name)
for i, rgb in enumerate(colours):
print(" ", rgb, "->", out.getpixel((i, 0)))Look at the results for the white patch. With relative colorimetric it should come out as zero or near zero ink in all four channels, because source white maps to paper white. With absolute colorimetric the white is not mapped to paper white, so it usually receives a small amount of ink. The saturated green and blue show the other difference. Perceptual and relative colorimetric give different ink values, and the gap between them is a rough measure of how far each colour lies outside the gamut.
Common errors
- Using absolute colorimetric for a final conversion. The white areas pick up ink to imitate a paper tint, and the result looks dull and tinted.
- Using perceptual on a matrix profile and expecting a change. Matrix profiles give the same result for perceptual and relative colorimetric.
- Converting twice. Each conversion clips or compresses again. Convert once from the original, and keep the RGB master.
- Judging clipping on the wrong screen. Out-of-gamut errors are easy to miss on an uncalibrated display. The later chapters on display calibration and soft proofing cover this.
Exercise
You are converting a photograph of a red flower from Adobe RGB to a coated CMYK profile. The red petals are far outside the CMYK gamut, and a test conversion with relative colorimetric shows flat, detail-free petals. Which intent should you try next, and why? Would the change matter if the destination were another matrix RGB profile?
Show answer
Try perceptual. Relative colorimetric clips every out-of-gamut red to the nearest printable colour, so petal gradients collapse into a single flat tone. Perceptual compresses the whole gamut, so the reds stay distinguishable at the cost of some shift in other colours. If the destination were a matrix RGB profile, the change would make no visible difference, because matrix profiles have no separate perceptual table and treat both intents alike.