Skip to main content

gamut_map_clamp

Function gamut_map_clamp 

Source
pub fn gamut_map_clamp(xyz: &Xyz) -> Xyz
Expand description

Map an out-of-gamut colour to the closest in-gamut colour.

This uses the simple clamping approach: convert to linear sRGB, clamp each channel to [0,1], and convert back to XYZ.