rust-hsluv 0.1.1

Color converstions. Convert to/from various color representations: hex, rgb, hsluv, hpluv, lch and xyz.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
extern crate hsluv;

use hsluv::*;

fn main() {
  let hex = "#ab3912";
  let hsluv = hex_to_hsluv(hex);
  let rgb = hsluv_to_rgb(hsluv);

  println!("Convert HEX {:?} to HSLUV: {:?}", hex, hsluv);
  println!("Convert HSLUV {:?} to RGB: {:?}", hsluv, rgb);
  println!("Convert RGB {:?} to HEX: {:?}", rgb, rgb_to_hex(rgb));
}