pub enum RenderingIntent {
Perceptual,
RelativeColorimetric,
Saturation,
AbsoluteColorimetric,
}Expand description
ICC rendering intent controlling out-of-gamut color mapping.
When converting colors between profiles with different gamuts, the rendering intent determines how colors outside the destination gamut are handled. Each intent makes a different trade-off between accuracy and aesthetics.
§Examples
use appthere_color::RenderingIntent;
let intent = RenderingIntent::Perceptual;
assert_eq!(intent, RenderingIntent::Perceptual);Variants§
Perceptual
Perceptual intent — optimizes for pleasing visual appearance.
Compresses the entire source gamut to fit within the destination gamut, preserving the relationships between colors. Best for photographic images where visual quality matters more than exact color matching.
RelativeColorimetric
Relative colorimetric intent — matches in-gamut colors exactly.
Maps the source white point to the destination white point and maps in-gamut colors exactly. Out-of-gamut colors are clipped to the nearest reproducible color. Best for proofing and logo colors.
Saturation
Saturation intent — maximizes color vividness.
Maps saturated source colors to saturated destination colors, prioritizing vividness over accuracy. Best for business graphics and charts where impact matters more than fidelity.
AbsoluteColorimetric
Absolute colorimetric intent — preserves exact colorimetry.
Like relative colorimetric but does not adjust for the destination white point. Colors are reproduced with absolute fidelity, including the media white point simulation. Best for exact color matching and substrate simulation in proofing.
Implementations§
Source§impl RenderingIntent
impl RenderingIntent
Sourcepub fn to_moxcms(self) -> RenderingIntent
pub fn to_moxcms(self) -> RenderingIntent
Converts this rendering intent to the corresponding moxcms intent.
§Examples
use appthere_color::RenderingIntent;
let intent = RenderingIntent::Perceptual;
let moxcms_intent = intent.to_moxcms();Sourcepub fn from_moxcms(intent: RenderingIntent) -> Self
pub fn from_moxcms(intent: RenderingIntent) -> Self
Creates a rendering intent from the corresponding moxcms intent.
§Examples
use appthere_color::RenderingIntent;
let intent = RenderingIntent::from_moxcms(moxcms::RenderingIntent::Perceptual);
assert_eq!(intent, RenderingIntent::Perceptual);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 moreSource§impl Debug for RenderingIntent
impl Debug for RenderingIntent
Source§impl Default for RenderingIntent
impl Default for RenderingIntent
Source§fn default() -> Self
fn default() -> Self
Returns RenderingIntent::Perceptual as the default.