Function palette::cast::from_uint_mut

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

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

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

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