pub struct Color {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: f32,
}
Expand description
Color in rgba format, where {red,green,blue} in 0..255, alpha in 0.0..1.0
Fields§
§r: u8
red channel, ranges from 0 to 255
g: u8
green channel, ranges from 0 to 255
b: u8
blue channel, ranges from 0 to 255
a: f32
alpha channel, ranges from 0.0 to 1.0
Trait Implementations§
Source§impl FromStr for Color
Parses CSS3 color strings into rgba Color.
Handles all errors to avoid any panic!s
impl FromStr for Color
Parses CSS3 color strings into rgba Color. Handles all errors to avoid any panic!s
impl Copy for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more