pub fn rgba(r: u8, g: u8, b: u8, a: f32) -> RGBAExpand description
Constructs a RGB Color from numerical values, similar to the
rgba function in CSS.
The alpha value is expressed as a float. Values outside of the 0.0-1.0 range will cause a panic.
ยงExample
use css_colors::{Color, rgba};
let salmon = rgba(250, 128, 114, 0.50);
assert_eq!(salmon.to_css(), "rgba(250, 128, 114, 0.50)");