Macro style::color::color_components_as

source ยท
macro_rules! color_components_as {
    ($c:expr, $t:ty) => { ... };
}
Expand description

Given an AbsoluteColor, return the 4 float components as the type given, e.g.:

let srgb = AbsoluteColor::new(ColorSpace::Srgb, 1.0, 0.0, 0.0, 0.0);
let floats = color_components_as!(&srgb, [f32; 4]); // [1.0, 0.0, 0.0, 0.0]