Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomcur/palette-gamut-mapping
Map between color spaces
https://github.com/tomcur/palette-gamut-mapping
css gamut-mapping
Last synced: 6 days ago
JSON representation
Map between color spaces
- Host: GitHub
- URL: https://github.com/tomcur/palette-gamut-mapping
- Owner: tomcur
- License: apache-2.0
- Created: 2024-06-04T08:16:15.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-04T09:19:12.000Z (5 months ago)
- Last Synced: 2024-10-07T21:08:51.499Z (about 1 month ago)
- Topics: css, gamut-mapping
- Language: Rust
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Gamut mapping
**Map between color spaces**
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](#license)
[![Apache 2.0](https://img.shields.io/badge/license-Apache-blue.svg)](#license)
[![Crates.io](https://img.shields.io/crates/v/palette-gamut-mapping.svg)](https://crates.io/crates/palette-gamut-mapping)
[![Docs](https://docs.rs/palette-gamut-mapping/badge.svg)](https://docs.rs/palette-gamut-mapping)Convert [Palette](https://crates.io/crates/palette) colors between color spaces
with [CSS Color Module Level 4's gamut mapping
algorithm](https://www.w3.org/TR/css-color-4/#gamut-mapping).```rust
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);
```