Struct cssparser::RGBA [] [src]

pub struct RGBA {
    pub red: f32,
    pub green: f32,
    pub blue: f32,
    pub alpha: f32,
}

A color with red, green, blue, and alpha components.

Fields

red: f32

The red channel. Nominally in 0.0 ... 1.0.

green: f32

The green channel. Nominally in 0.0 ... 1.0.

blue: f32

The blue channel. Nominally in 0.0 ... 1.0.

alpha: f32

The alpha (opacity) channel. Clamped to 0.0 ... 1.0.

Trait Implementations

impl Debug for RGBA
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq for RGBA
[src]

fn eq(&self, __arg_0: &RGBA) -> bool

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

fn ne(&self, __arg_0: &RGBA) -> bool

This method tests for !=.

impl Copy for RGBA
[src]

impl Clone for RGBA
[src]

fn clone(&self) -> RGBA

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 ToCss for RGBA
[src]

fn to_css<W>(&self, dest: &mut W) -> Result where W: Write

Serialize self in CSS syntax, writing to dest.

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more

fn fmt_to_css<W>(&self, dest: &mut W) -> Result where W: Write

Serialize self in CSS syntax and return a result compatible with std::fmt::Show. Read more