Function palette::cast::from_array_array

source ยท
pub fn from_array_array<T, const N: usize>(values: [T::Array; N]) -> [T; N]
where T: ArrayCast,
Expand description

Cast from an array of arrays to an array of colors.

use palette::{cast, Srgb};

let arrays = [[64, 139, 10], [93, 18, 214]];
assert_eq!(
    cast::from_array_array::<Srgb<u8>, 2>(arrays),
    [Srgb::new(64u8, 139, 10), Srgb::new(93, 18, 214)]
)