Enum style::values::specified::color::Color [] [src]

pub enum Color {
    CurrentColor,
    Numeric {
        parsed: RGBA,
        authored: Option<Box<str>>,
    },
    Complex(ComputedColor),
}

Specified color value

Variants

The 'currentColor' keyword

A specific RGBA color

Fields of Numeric

Parsed RGBA color

Authored representation

A complex color value from computed value

Methods

impl Color
[src]

[src]

Returns currentcolor value.

[src]

Returns transparent value.

[src]

Returns a numeric RGBA color value.

[src]

[src]

Returns false if the color is completely transparent, and true otherwise.

impl Color
[src]

[src]

Converts this Color into a ComputedColor.

If context is None, and the specified color requires data from the context to resolve, then None is returned.

Trait Implementations

impl Clone for Color
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Color
[src]

[src]

Formats the value using the given formatter. Read more

impl MallocSizeOf for Color
[src]

[src]

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

impl PartialEq for Color
[src]

[src]

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

[src]

This method tests for !=.

impl From<RGBA> for Color
[src]

[src]

Performs the conversion.

impl Parse for Color
[src]

[src]

Parse a value of this type. Read more

impl ToCss for Color
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

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

impl ToComputedValue for Color
[src]

The computed value type we're going to be converted to.

[src]

Convert a specified value to a computed value, using itself and the data inside the Context. Read more

[src]

Convert a computed value to specified value form. Read more

impl From<Color> for RGBAColor
[src]

[src]

Performs the conversion.