#color #pixel #rgb #lab

lab

Tools for converting RGB colors to the CIE-Lab* color space, and comparing differences in color

7 unstable releases

0.4.3 Jun 1, 2018
0.4.2 May 23, 2017
0.3.0 Jan 30, 2017
0.2.0 Jan 30, 2017
0.1.0 Jan 29, 2017

#26 in Images

Download history 39/week @ 2018-05-27 69/week @ 2018-06-03 35/week @ 2018-06-10 42/week @ 2018-06-17 26/week @ 2018-06-24 102/week @ 2018-07-01 29/week @ 2018-07-08 22/week @ 2018-07-15 43/week @ 2018-07-22 40/week @ 2018-07-29 97/week @ 2018-08-05 46/week @ 2018-08-12 24/week @ 2018-08-19

172 downloads per month
Used in 3 crates

MIT license

11KB
212 lines

Rust library for converting RGB colors to the CIE-L*a*b* color space

extern crate lab;
use lab::Lab;

let pink_in_lab = Lab::from_rgb(&[253, 120, 138]);
// Lab { l: 66.639084, a: 52.251457, b: 14.860654 }
extern crate lab;
extern crate image;

use lab::Lab;
use image::Rgba;

let pixel: Rgba<u8> = Rgba { data: [253, 120, 138, 255] };
let lab = Lab::from_rgba(&pixel.data);
// Lab { l: 66.639084, a: 52.251457, b: 14.860654 }

lib.rs:

Lab

Tools for converting RGB colors to L*a*b* measurements.

No runtime deps