Skip to content

A Rust library for defining and manipulating colors that conforms the the W3C CSS Color Module Level 4 working draft

License

Notifications You must be signed in to change notification settings

billhannah/rusty-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rusty Colors

A Rust Crate for declaring, converting and transforming colors as defined in the CSS Color Module Level 4 Working Draft.

Color definitions used for storage and conversion

The colors will be stored in memory as either an sRGB or OKLab color space to simplify converting between color spaces. sRGB contains 3 channels representing Red, Green, and Blue values as a percentage. OKLab is a perceptually uniform color space using a rectangular coordinate system for hue and an axis to specify lightness.

The OKLab color space is used for internally representing LAB colors, as it’s lightness range is greater. Lightness values greater than 100% are permitted to allow for forwards compatibility with HDR devices. If the Lightness value is converted to a CIE Lab color and the value is greater than 1 (100%), it will be clamped to 1.

Author

Bill Hannah

Licence

This project is licenced under the MIT Licences (LICENSE or http://opensource.org/licenses/MIT)

About

A Rust library for defining and manipulating colors that conforms the the W3C CSS Color Module Level 4 working draft

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages