#color #convert #rgb #represents

hsl

Represent colors in HSL and convert between HSL and RGB

2 releases

Uses old Rust 2015

0.1.1 Jan 11, 2016
0.1.0 Sep 25, 2015

#4 in #represent

Download history 263/week @ 2023-12-13 207/week @ 2023-12-20 170/week @ 2023-12-27 249/week @ 2024-01-03 248/week @ 2024-01-10 214/week @ 2024-01-17 122/week @ 2024-01-24 103/week @ 2024-01-31 176/week @ 2024-02-07 172/week @ 2024-02-14 198/week @ 2024-02-21 187/week @ 2024-02-28 315/week @ 2024-03-06 178/week @ 2024-03-13 239/week @ 2024-03-20 201/week @ 2024-03-27

963 downloads per month
Used in 16 crates (9 directly)

MIT/Apache

10KB
125 lines

HSL

Note: Unmaintained -- contact @killercup if you want to have the name on crates.io!

Represent colors in HSL and convert between HSL and RGB.

Build Status Coverage Status

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Represent colors in HSL and convert between HSL and RGB.

Examples

use hsl::HSL;

let yellow = [255, 255, 0];
let yellow_hsl = HSL::from_rgb(&yellow);

assert_eq!(yellow_hsl, HSL { h: 60_f64, s: 1_f64, l: 0.5_f64 });

Dependencies

~120KB