Type Alias cosmic::cosmic_theme::palette::Srgba

source ·
pub type Srgba<T = f32> = Alpha<Rgb<Srgb, T>, T>;
Expand description

Non-linear sRGB with an alpha component.

This is a transparent version of Srgb, which is commonly used as the input or output format. If you are looking for “just RGBA”, this is probably it.

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

Aliased Type§

struct Srgba<T = f32> {
    pub color: Rgb<Srgb, T>,
    pub alpha: T,
}

Fields§

§color: Rgb<Srgb, T>

The color.

§alpha: T

The transparency component. 0.0 (or 0u8) is fully transparent and 1.0 (or 255u8) is fully opaque.