Struct css_color_parser::Color
[−]
[src]
pub struct Color { pub r: u8, pub g: u8, pub b: u8, pub a: f32, }
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
impl Copy for Color
[src]
impl Clone for Color
[src]
fn clone(&self) -> Color
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Color
[src]
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Color) -> bool
This method tests for !=
.
impl Display for Color
[src]
impl FromStr for Color
[src]
Parses CSS3 color strings into rgba Color. Handles all errors to avoid any panic!s
type Err = ColorParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, ColorParseError>
Parses a string s
to return a value of this type. Read more