Type Alias cosmic::cosmic_theme::palette::rgb::GammaSrgb

source ·
pub type GammaSrgb<T = f32> = Rgb<Gamma<Srgb>, T>;
Expand description

Gamma 2.2 encoded sRGB.

This is similar to Srgb, but uses the exponent function as an approximation. It’s a common trick to speed up conversion when accuracy can be sacrificed. It’s still faster to use Srgb when also converting to and from u8 at the same time.

See Rgb for more details on how to create a value and use it.

Aliased Type§

struct GammaSrgb<T = f32> {
    pub red: T,
    pub green: T,
    pub blue: T,
    pub standard: PhantomData<Gamma<Srgb>>,
}

Fields§

§red: T

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

§green: T

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

§blue: T

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

§standard: PhantomData<Gamma<Srgb>>

The kind of RGB standard. sRGB is the default.