2 releases
0.1.1 | Jun 4, 2024 |
---|---|
0.1.0 | May 22, 2024 |
#7 in #css-color
Used in hi-nvim-rs
10KB
153 lines
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);
Dependencies
~2.5MB
~48K SLoC