Function lab::labs_to_rgb_bytes [−][src]
pub fn labs_to_rgb_bytes(labs: &[Lab]) -> Vec<u8>
Expand description
Lab to RGB conversion that returns RGB triples flattened into a Vec<u8>
Example
let labs = &[ Lab { l: 91.11321, a: -48.08751, b: -14.131201 }, Lab { l: 60.32421, a: 98.23433, b: -60.824894 }, Lab { l: 97.13926, a: -21.553724, b: 94.47797 }, ]; let rgb_bytes = lab::labs_to_rgb_bytes(labs); assert_eq!(rgb_bytes, vec![0, 255, 255, 255, 0, 255, 255, 255, 0]);