Function lux::color::rgb
[−]
[src]
pub fn rgb<T: ToColorComponent>(r: T, g: T, b: T) -> [f32; 4]
Constructs a color from R, G, and B components.
Alpha is set to 100%.
If the numbers are u8s the scale is from 0 to 255. If the numbers
are floating point, the scale is from 0.0 to 1.0.
// With f32 or f64 let pure_red = rgb(1.0, 0.0, 0.0); // With integers let pure_green = rgb(0, 255, 0);