#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 #represents

Download history 230/week @ 2024-08-02 283/week @ 2024-08-09 207/week @ 2024-08-16 239/week @ 2024-08-23 299/week @ 2024-08-30 185/week @ 2024-09-06 193/week @ 2024-09-13 267/week @ 2024-09-20 251/week @ 2024-09-27 110/week @ 2024-10-04 119/week @ 2024-10-11 197/week @ 2024-10-18 197/week @ 2024-10-25 230/week @ 2024-11-01 94/week @ 2024-11-08 79/week @ 2024-11-15

631 downloads per month
Used in 17 crates (10 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

~145KB