pub type GammaSrgba<T = f32> = Alpha<Rgb<Gamma<Srgb>, T>, T>;👎Deprecated since 0.7.7:
Gamma, GammaFn and F2p2 are error prone and incorrectly implemented. See palette::encoding for possible alternatives or implement palette::encoding::FromLinear and palette::encoding::IntoLinear for a custom type.
Expand description
Gamma 2.2 encoded sRGB with an alpha component.
This is similar to Srgba, 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 Srgba when also converting to and
from u8 at the same time.
See Rgb, Rgba and Alpha for more details on how to
create a value and use it.
Aliased Type§
#[repr(C)]pub struct GammaSrgba<T = f32> {
pub color: Rgb<Gamma<Srgb>, T>,
pub alpha: T,
}Fields§
§color: Rgb<Gamma<Srgb>, T>The color.
alpha: TThe transparency component. 0.0 (or 0u8) is fully transparent and 1.0 (or 255u8) is fully opaque.