Function palette::cast::into_array_slice
source ยท pub fn into_array_slice<T>(values: &[T]) -> &[T::Array]where
T: ArrayCast,
Expand description
Cast from a slice of colors to a slice of arrays.
use palette::{cast, Srgb};
let colors = &[Srgb::new(64u8, 139, 10), Srgb::new(93, 18, 214)];
assert_eq!(cast::into_array_slice(colors), &[[64, 139, 10], [93, 18, 214]])