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;

    // Required methods
    fn r(&self) -> u8;
    fn g(&self) -> u8;
    fn b(&self) -> u8;
}
Expand description

RGB color.

Required Associated Constants§

source

const MAX_R: u8

The maximum value in the red channel.

source

const MAX_G: u8

The maximum value in the green channel.

source

const MAX_B: u8

The maximum value in the blue channel.

source

const BLACK: Self

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

source

const RED: Self

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

source

const GREEN: Self

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

source

const BLUE: Self

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

source

const YELLOW: Self

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

source

const MAGENTA: Self

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

source

const CYAN: Self

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

source

const WHITE: Self

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

Required Methods§

source

fn r(&self) -> u8

Returns the red channel value.

source

fn g(&self) -> u8

Returns the green channel value.

source

fn b(&self) -> u8

Returns the blue channel value.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RgbColor for Bgr555

source§

const MAX_R: u8 = 31u8

source§

const MAX_G: u8 = 31u8

source§

const MAX_B: u8 = 31u8

source§

const BLACK: Self = _

source§

const RED: Self = _

source§

const GREEN: Self = _

source§

const BLUE: Self = _

source§

const YELLOW: Self = _

source§

const MAGENTA: Self = _

source§

const CYAN: Self = _

source§

const WHITE: Self = _

source§

impl RgbColor for Bgr565

source§

const MAX_R: u8 = 31u8

source§

const MAX_G: u8 = 63u8

source§

const MAX_B: u8 = 31u8

source§

const BLACK: Self = _

source§

const RED: Self = _

source§

const GREEN: Self = _

source§

const BLUE: Self = _

source§

const YELLOW: Self = _

source§

const MAGENTA: Self = _

source§

const CYAN: Self = _

source§

const WHITE: Self = _

source§

impl RgbColor for Bgr888

source§

const MAX_R: u8 = 255u8

source§

const MAX_G: u8 = 255u8

source§

const MAX_B: u8 = 255u8

source§

const BLACK: Self = _

source§

const RED: Self = _

source§

const GREEN: Self = _

source§

const BLUE: Self = _

source§

const YELLOW: Self = _

source§

const MAGENTA: Self = _

source§

const CYAN: Self = _

source§

const WHITE: Self = _

source§

impl RgbColor for Rgb555

source§

const MAX_R: u8 = 31u8

source§

const MAX_G: u8 = 31u8

source§

const MAX_B: u8 = 31u8

source§

const BLACK: Self = _

source§

const RED: Self = _

source§

const GREEN: Self = _

source§

const BLUE: Self = _

source§

const YELLOW: Self = _

source§

const MAGENTA: Self = _

source§

const CYAN: Self = _

source§

const WHITE: Self = _

source§

impl RgbColor for Rgb565

source§

const MAX_R: u8 = 31u8

source§

const MAX_G: u8 = 63u8

source§

const MAX_B: u8 = 31u8

source§

const BLACK: Self = _

source§

const RED: Self = _

source§

const GREEN: Self = _

source§

const BLUE: Self = _

source§

const YELLOW: Self = _

source§

const MAGENTA: Self = _

source§

const CYAN: Self = _

source§

const WHITE: Self = _

source§

impl RgbColor for Rgb888

source§

const MAX_R: u8 = 255u8

source§

const MAX_G: u8 = 255u8

source§

const MAX_B: u8 = 255u8

source§

const BLACK: Self = _

source§

const RED: Self = _

source§

const GREEN: Self = _

source§

const BLUE: Self = _

source§

const YELLOW: Self = _

source§

const MAGENTA: Self = _

source§

const CYAN: Self = _

source§

const WHITE: Self = _