logo
pub struct HslColor {
    pub hue: f32,
    pub saturation: f32,
    pub lightness: f32,
}
Expand description

Hsl color representation

Fields

hue: f32

Hue component

saturation: f32

Saturation component

lightness: f32

Lightness component

Implementations

Create new Hsl color with parameters

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Retrieve hue component

Retrieve saturation

Set the saturation

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

This method tests for !=.

Create color with rounded values

Set the hue component

Auto Trait Implementations

Blanket Implementations

Adjust hue component of color with delta

Rotate hue component with 180 degrees

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Convert from color

Retrieve hsl saturation

Set hsv saturation

Typed getter

Desaturate the color to grayscale

Inspect the context.

Inspect the context.

Inspect the context.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert into color

Invert color

Lighten the color with delta

Darken the color with delta

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Saturate the color with delta

Desaturate the color with delta

Sets value as a parameter of self.

Retrieve hsl saturation

Set hsv saturation

Represents a color as a hexadecimal string

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.