[][src]Trait embedded_graphics::prelude::RgbColor

pub trait RgbColor: PixelColor {
    const MAX_R: u8;
    const MAX_G: u8;
    const MAX_B: u8;
    const BLACK: Self;
    const RED: Self;
    const GREEN: Self;
    const BLUE: Self;
    const YELLOW: Self;
    const MAGENTA: Self;
    const CYAN: Self;
    const WHITE: Self;

    fn r(&self) -> u8;
fn g(&self) -> u8;
fn b(&self) -> u8; }

RGB color.

Associated Constants

const MAX_R: u8

The maximum value in the red channel.

const MAX_G: u8

The maximum value in the green channel.

const MAX_B: u8

The maximum value in the blue channel.

const BLACK: Self

Black color (R: 0%, G: 0%, B: 0%)

const RED: Self

Red color (R: 100%, G: 0%, B: 0%)

const GREEN: Self

Green color (R: 0%, G: 100%, B: 0%)

const BLUE: Self

Blue color (R: 0%, G: 0%, B: 100%)

const YELLOW: Self

Yellow color (R: 100%, G: 100%, B: 0%)

const MAGENTA: Self

Magenta color (R: 100%, G: 0%, B: 100%)

const CYAN: Self

Cyan color (R: 0%, G: 100%, B: 100%)

const WHITE: Self

White color (R: 100%, G: 100%, B: 100%)

Loading content...

Required methods

fn r(&self) -> u8

Returns the red channel value.

fn g(&self) -> u8

Returns the green channel value.

fn b(&self) -> u8

Returns the blue channel value.

Loading content...

Implementors

impl RgbColor for Bgr555[src]

impl RgbColor for Bgr565[src]

impl RgbColor for Bgr888[src]

impl RgbColor for Rgb555[src]

impl RgbColor for Rgb565[src]

impl RgbColor for Rgb888[src]

Loading content...