Trait embedded_graphics::pixelcolor::GrayColor[][src]

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

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

Grayscale color.

Associated Constants

const BLACK: Self[src]

Black color (0% luma).

const WHITE: Self[src]

White color (100% luma).

Required methods

fn luma(&self) -> u8[src]

Returns the luma channel value.

Implementors

impl GrayColor for Gray2[src]

pub fn luma(&self) -> u8[src]

pub const BLACK: Gray2[src]

pub const WHITE: Gray2[src]

impl GrayColor for Gray4[src]

pub fn luma(&self) -> u8[src]

pub const BLACK: Gray4[src]

pub const WHITE: Gray4[src]

impl GrayColor for Gray8[src]

pub fn luma(&self) -> u8[src]

pub const BLACK: Gray8[src]

pub const WHITE: Gray8[src]