Trait Palette

pub trait Palette {
    const COLORS: &'static [(u8, u8, u8)];

    // Provided method
    fn pick(idx: usize) -> PaletteColor<Self>
       where Self: Sized { ... }
}
Expand description

Represents a color palette

Required Associated Constants§

const COLORS: &'static [(u8, u8, u8)]

Array of colors

Provided Methods§

fn pick(idx: usize) -> PaletteColor<Self>
where Self: Sized,

Returns a color from the palette

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl Palette for Palette99

§

const COLORS: &'static [(u8, u8, u8)]

§

impl Palette for Palette100

§

const COLORS: &'static [(u8, u8, u8)]

§

impl Palette for Palette9999

§

const COLORS: &'static [(u8, u8, u8)]