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]

[src]

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

[src]

Calculate and return the luminance of the Color.

[src]

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.

[src]

Extract the components of a color in the HSL format.

[src]

Extract the components of a color in the RGB format.

[src]

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

[src]

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

[src]

Return the same color but with the given luminance.

[src]

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

[src]

Return the same color but with the given alpha.

[src]

Return a highlighted version of the current Color.

[src]

Return a clicked version of the current Color.

[src]

Return the Color's invert.

[src]

Return the red value.

[src]

Return the green value.

[src]

Return the blue value.

[src]

Set the red value.

[src]

Set the green value.

[src]

Set the blue value.

Trait Implementations

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 Copy for Color
[src]

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.

impl From<Color> for Hsla
[src]

[src]

Performs the conversion.

impl From<Hsla> for Color
[src]

[src]

Performs the conversion.

impl From<Color> for Rgba
[src]

[src]

Performs the conversion.

impl From<Rgba> for Color
[src]

[src]

Performs the conversion.