Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 823 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 823 Bytes

Gamut mapping

Map between color spaces

MIT Apache 2.0 Crates.io Docs

Convert Palette colors between color spaces with CSS Color Module Level 4's gamut mapping algorithm.

use palette::{Oklch, Srgb};
use palette_gamut_mapping::gamut_map;

let color = Oklch::new(0.5, 0.205, 230.);

// roughly equal to #006d91
let srgb: Srgb = gamut_map(color);