#lab #color #pixel #rgb

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

#25 in Images

Download history 27/week @ 2018-05-05 20/week @ 2018-05-12 22/week @ 2018-05-19 54/week @ 2018-05-26 67/week @ 2018-06-02 35/week @ 2018-06-09 44/week @ 2018-06-16 26/week @ 2018-06-23 102/week @ 2018-06-30 29/week @ 2018-07-07 22/week @ 2018-07-14 43/week @ 2018-07-21 38/week @ 2018-07-28

172 downloads per month

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.6348, a: 52.260696, b: 14.850557 }
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.6348, a: 52.260696, b: 14.850557 }

lib.rs:

Lab

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

MIT license
  • No runtime deps

Reverse deps