Type Alias syntastica::style::Color

pub type Color = Rgb<Srgb, u8>;
Expand description

A non-transparent color with red, green, and blue values between 0 and 255.

The type is an alias to palette::Srgb<u8>, so there are many ways of obtaining instances of this type. For example, you could add a dependency an palette with the named feature enabled, to access a list of predefined colors in the palette::named module.

Aliased Type§

struct Color {
    pub red: u8,
    pub green: u8,
    pub blue: u8,
    pub standard: PhantomData<Srgb>,
}

Fields§

§red: u8

The amount of red light, where 0.0 is no red light and 1.0f (or 255u8) is the highest displayable amount.

§green: u8

The amount of green light, where 0.0 is no green light and 1.0f (or 255u8) is the highest displayable amount.

§blue: u8

The amount of blue light, where 0.0 is no blue light and 1.0f (or 255u8) is the highest displayable amount.

§standard: PhantomData<Srgb>

The kind of RGB standard. sRGB is the default.