Type Definition palette::rgb::Rgba [−][src]
type Rgba<S = Srgb, T = f32> = Alpha<Rgb<S, T>, T>;
Generic RGB with an alpha component. See the Rgba
implementation in
Alpha
.
Implementations
impl<S: RgbStandard> Rgba<S, u8>
[src]
impl<S: RgbStandard> Rgba<S, u8>
[src]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);
pub fn into_u32<C: RgbChannels>(self) -> u32
[src]
Convert to a packed u32
with with specifiable component order.
Defaults to ARGB ordering (0xAARRGGBB).
See Packed for more details.
pub fn from_u32<C: RgbChannels>(color: u32) -> Self
[src]
Convert from a packed u32
with specifiable component order. Defaults
to ARGB ordering (0xAARRGGBB).
See Packed for more details.