Type Definition palette::rgb::Rgba [−][src]
type Rgba<S = Srgb, T = f32> = Alpha<Rgb<S, T>, T>;
Expand description
Generic RGB with an alpha component. See the Rgba
implementation in
Alpha
.
Implementations
Convenience functions to convert between a packed u32
and Rgba
.
use palette::Srgba; let rgba = Srgba::from(0x607F00FF); assert_eq!(Srgba::new(96u8, 127, 0, 255), rgba); let integer = u32::from(rgba); assert_eq!(0x607F00FF, integer);