Crates.io | palette-gamut-mapping |
lib.rs | palette-gamut-mapping |
version | 0.1.1 |
source | src |
created_at | 2024-05-22 10:02:06.711142 |
updated_at | 2024-06-04 09:19:08.259643 |
description | Convert colors between color spaces with CSS Color Module Level 4 gamut mapping |
homepage | |
repository | https://github.com/tomcur/palette-gamut-mapping |
max_upload_size | |
id | 1247768 |
size | 25,066 |
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);