Enum conrod::color::Color[][src]

pub enum Color {
    Rgba(f32f32f32f32),
    Hsla(f32f32f32f32),
}

Color supporting RGB and HSL variants.

Variants

Red, Green, Blue, Alpha - All values' scales represented between 0.0 and 1.0.

Hue, Saturation, Lightness, Alpha - all valuess scales represented between 0.0 and 1.0.

Methods

impl Color
[src]

Produce a complementary color. The two colors will accent each other. This is the same as rotating the hue by 180 degrees.

Calculate and return the luminance of the Color.

Return either black or white, depending which contrasts the Color the most. This will be useful for determining a readable color for text on any given background Color.

Extract the components of a color in the HSL format.

Extract the components of a color in the RGB format.

Extract the components of a color in the RGB format within a fixed-size array.

Same as to_fsa, except r, g, b and a are represented in byte form.

Return the same color but with the given luminance.

Return the same color but with the alpha multiplied by the given alpha.

Return the same color but with the given alpha.

Return a highlighted version of the current Color.

Return a clicked version of the current Color.

Return the Color's invert.

Return the red value.

Return the green value.

Return the blue value.

Set the red value.

Set the green value.

Set the blue value.

Trait Implementations

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 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. Read more

impl From<Color> for Hsla
[src]

Performs the conversion.

impl From<Hsla> for Color
[src]

Performs the conversion.

impl From<Color> for Rgba
[src]

Performs the conversion.

impl From<Rgba> for Color
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Color

impl Sync for Color