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

red channel, ranges from 0 to 255

green channel, ranges from 0 to 255

blue channel, ranges from 0 to 255

alpha channel, ranges from 0.0 to 1.0

Trait Implementations

impl Copy for Color
[src]

impl Clone for Color
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Color
[src]

Formats the value using the given formatter.

impl PartialEq for Color
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Display for Color
[src]

Formats the value using the given formatter. Read more

impl FromStr for Color
[src]

Parses CSS3 color strings into rgba Color. Handles all errors to avoid any panic!s

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more