pub trait GrayColor: PixelColor {
    const BLACK: Self;
    const WHITE: Self;

    // Required method
    fn luma(&self) -> u8;
}
Expand description

Grayscale color.

Required Associated Constants§

source

const BLACK: Self

Black color (0% luma).

source

const WHITE: Self

White color (100% luma).

Required Methods§

source

fn luma(&self) -> u8

Returns the luma channel value.

Implementors§

source§

impl GrayColor for Gray2

source§

const BLACK: Gray2 = Self::new(0)

source§

const WHITE: Gray2 = Self::new(255)

source§

impl GrayColor for Gray4

source§

const BLACK: Gray4 = Self::new(0)

source§

const WHITE: Gray4 = Self::new(255)

source§

impl GrayColor for Gray8

source§

const BLACK: Gray8 = Self::new(0)

source§

const WHITE: Gray8 = Self::new(255)