logo
pub struct RgbaColor {
    pub red: u8,
    pub green: u8,
    pub blue: u8,
    pub alpha: u8,
}
Expand description

Rgba color representation with u8 components

Fields

red: u8

Red component

green: u8

Green component

blue: u8

Blue component

alpha: u8

Alpha component

Implementations

Create new Rgba 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.

Converts to this type from the input type.

Retrieve the alpha component

Retrieve the alpha component as opacity

Retrieve the alpha component as transparency

Retrieve the color component

Set the color component

Retrieve the color and aplha components

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

This method tests for !=.

Set the alpha component

Set the alpha component as opacity

Set the alpha component as transparency

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 hue component

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

Set the hue component

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.