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);

Convert to a packed u32 with with specifiable component order. Defaults to ARGB ordering (0xAARRGGBB).

See Packed for more details.

Convert from a packed u32 with specifiable component order. Defaults to ARGB ordering (0xAARRGGBB).

See Packed for more details.

Trait Implementations

Performs the conversion.

Performs the conversion.