pub enum RenderingIntent {
Perceptual,
RelativeColorimetric,
Saturation,
AbsoluteColorimetric,
}Expand description
ICC rendering intent — controls how colors outside the destination gamut are handled during a profile-to-profile transform.
§Which intent to use
For display-to-display workflows (web images, app thumbnails, photo
export): use RelativeColorimetric. It
preserves in-gamut colors exactly and is the de facto standard for screen
output.
For photographic print with a profile that has a perceptual table:
use Perceptual. It compresses the full source gamut
smoothly instead of clipping.
For soft-proofing (“what will this print look like on screen”): use
AbsoluteColorimetric to simulate the
paper white.
Saturation is for business graphics (pie charts,
logos). It is almost never correct for photographic images.
§Interaction with ICC profiles
An ICC profile may contain up to four LUTs (AToB0–AToB3), one per intent.
Most display profiles only ship a single LUT (relative colorimetric).
When you request an intent whose LUT is absent, the CMS silently falls
back to the profile’s default — usually relative colorimetric. This means
Perceptual and RelativeColorimetric produce identical output for
the vast majority of display profiles (sRGB IEC 61966-2.1, Display P3,
etc.). The distinction only matters for print/press profiles that include
dedicated perceptual gamut-mapping tables.
§Bugs and pitfalls
-
Perceptual on display profiles is a no-op. Requesting
Perceptualdoesn’t add gamut mapping when the profile lacks a perceptual table — it silently degrades to clipping. If you need actual gamut mapping between display profiles, you must supply a profile that contains perceptual intent tables (e.g., a proofing profile or a carefully authored display profile). -
AbsoluteColorimetric tints whites. Source white is preserved literally, so a D50 source on a D65 display shows yellowish whites. Never use this for final output — only for proofing previews.
-
Saturation may shift hues. The ICC spec allows saturation-intent tables to sacrifice hue accuracy for vividness. Photographs will look wrong.
Variants§
Perceptual
Compress the entire source gamut into the destination gamut, preserving the perceptual relationship between colors at the cost of shifting all values (including in-gamut ones).
Requires a perceptual LUT in the profile. Most display profiles
omit this table, so the CMS falls back to relative colorimetric
silently. This intent only behaves differently from
RelativeColorimetric when both source and destination profiles
contain dedicated perceptual rendering tables — typically print,
press, or carefully authored proofing profiles.
When it works: smooth, continuous gamut mapping with no hard clips.
When the LUT is missing: identical to RelativeColorimetric.
CMS compatibility warning: moxcms’s perceptual intent
implementation does not match lcms2’s output and may not be
accurate for all profile combinations. If cross-CMS consistency
matters, prefer RelativeColorimetric.
RelativeColorimetric
Preserve in-gamut colors exactly; clip out-of-gamut colors to the nearest boundary color. White point is adapted from source to destination (source white → destination white).
This is the correct default for virtually all display-to-display workflows: web images, app thumbnails, photo export, screen preview. Colors that fit in the destination gamut are reproduced without any remapping — what the numbers say is what you get.
Tradeoff: saturated gradients that cross the gamut boundary can show hard clipping artifacts (banding). If the source gamut is much wider than the destination (e.g., BT.2020 → sRGB), consider whether a perceptual-intent profile or a dedicated gamut-mapping step would produce smoother results.
Saturation
Maximize saturation and vividness, sacrificing hue accuracy. Designed for business graphics: charts, logos, presentation slides.
Not suitable for photographs. Hue shifts are expected and intentional — the goal is “vivid”, not “accurate”.
Like Perceptual, many profiles lack a saturation-intent LUT.
When absent, the CMS falls back to the profile’s default intent.
AbsoluteColorimetric
Like RelativeColorimetric but without white point adaptation.
Source white is preserved literally: a D50 (warm) source displayed
on a D65 (cool) screen will show yellowish whites.
Use exclusively for soft-proofing: simulating how a print will look by preserving the paper white and ink gamut on screen. Never use for final output — the tinted whites look wrong on every display except the exact one being simulated.
Trait Implementations§
Source§impl Clone for RenderingIntent
impl Clone for RenderingIntent
Source§fn clone(&self) -> RenderingIntent
fn clone(&self) -> RenderingIntent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more