Struct cssparser::RGBA [−][src]
Expand description
A color with red, green, blue, and alpha components, in a byte each.
Fields
red: u8
The red component.
green: u8
The green component.
blue: u8
The blue component.
alpha: u8
The alpha component.
Implementations
Constructs a new RGBA value from float components. It expects the red, green, blue and alpha channels in that order, and all values will be clamped to the 0.0 … 1.0 range.
Returns a transparent color.
Same thing, but with u8
values instead of floats in the 0 to 1 range.
Returns the red channel in a floating point number form, from 0 to 1.
Returns the green channel in a floating point number form, from 0 to 1.
Returns the blue channel in a floating point number form, from 0 to 1.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RGBA
impl UnwindSafe for RGBA
Blanket Implementations
Mutably borrows from an owned value. Read more