#color #hex #rgb

chrom

A simple library for representing colours

2 stable releases

1.1.0 Aug 9, 2023
1.0.0 Jul 27, 2023

#773 in Math

30 downloads per month

MIT license

7KB
123 lines

Chrom

Chrom is a simple rust library for representing colours.


lib.rs:

A simple library for representing colours

Examples

use chrom::Colour;

// Make a new colour using a hex value
let white = Colour(0xffffff);
// Make a new colour using built-in constants
let blue = Colour::BLUE;
// Make a new colour using RGB values
let yellow = Colour::from_rgb(254, 231, 92);

Feature flags

serde - Enable serde features

Dependencies

~180KB