Function cosmic::cosmic_theme::palette::cast::into_array_array
source ยท pub fn into_array_array<T, const N: usize>(
values: [T; N],
) -> [<T as ArrayCast>::Array; N]where
T: ArrayCast,
Expand description
Cast from an array of colors to an array of arrays.
use palette::{cast, Srgb};
let colors = [Srgb::new(64u8, 139, 10), Srgb::new(93, 18, 214)];
assert_eq!(cast::into_array_array(colors), [[64, 139, 10], [93, 18, 214]])