palette::cast

Function into_uint_mut

source
pub fn into_uint_mut<T>(value: &mut T) -> &mut T::Uint
where T: UintCast,
Expand description

Cast from a mutable color type reference to a mutable unsigned integer reference.

use palette::{cast, rgb::PackedArgb, Srgba};

let mut color: PackedArgb = Srgba::new(0x17, 0xC6, 0x4C, 0xFF).into();
assert_eq!(cast::into_uint_mut(&mut color), &mut 0xFF17C64C);