Trait embedded_graphics::pixelcolor::RgbColor

source ·
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: Bgr555 = _

source§

const RED: Bgr555 = _

source§

const GREEN: Bgr555 = _

source§

const BLUE: Bgr555 = _

source§

const YELLOW: Bgr555 = _

source§

const MAGENTA: Bgr555 = _

source§

const CYAN: Bgr555 = _

source§

const WHITE: Bgr555 = _

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: Bgr565 = _

source§

const RED: Bgr565 = _

source§

const GREEN: Bgr565 = _

source§

const BLUE: Bgr565 = _

source§

const YELLOW: Bgr565 = _

source§

const MAGENTA: Bgr565 = _

source§

const CYAN: Bgr565 = _

source§

const WHITE: Bgr565 = _

source§

impl RgbColor for Bgr666

source§

const MAX_R: u8 = 63u8

source§

const MAX_G: u8 = 63u8

source§

const MAX_B: u8 = 63u8

source§

const BLACK: Bgr666 = _

source§

const RED: Bgr666 = _

source§

const GREEN: Bgr666 = _

source§

const BLUE: Bgr666 = _

source§

const YELLOW: Bgr666 = _

source§

const MAGENTA: Bgr666 = _

source§

const CYAN: Bgr666 = _

source§

const WHITE: Bgr666 = _

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: Bgr888 = _

source§

const RED: Bgr888 = _

source§

const GREEN: Bgr888 = _

source§

const BLUE: Bgr888 = _

source§

const YELLOW: Bgr888 = _

source§

const MAGENTA: Bgr888 = _

source§

const CYAN: Bgr888 = _

source§

const WHITE: Bgr888 = _

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: Rgb555 = _

source§

const RED: Rgb555 = _

source§

const GREEN: Rgb555 = _

source§

const BLUE: Rgb555 = _

source§

const YELLOW: Rgb555 = _

source§

const MAGENTA: Rgb555 = _

source§

const CYAN: Rgb555 = _

source§

const WHITE: Rgb555 = _

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: Rgb565 = _

source§

const RED: Rgb565 = _

source§

const GREEN: Rgb565 = _

source§

const BLUE: Rgb565 = _

source§

const YELLOW: Rgb565 = _

source§

const MAGENTA: Rgb565 = _

source§

const CYAN: Rgb565 = _

source§

const WHITE: Rgb565 = _

source§

impl RgbColor for Rgb666

source§

const MAX_R: u8 = 63u8

source§

const MAX_G: u8 = 63u8

source§

const MAX_B: u8 = 63u8

source§

const BLACK: Rgb666 = _

source§

const RED: Rgb666 = _

source§

const GREEN: Rgb666 = _

source§

const BLUE: Rgb666 = _

source§

const YELLOW: Rgb666 = _

source§

const MAGENTA: Rgb666 = _

source§

const CYAN: Rgb666 = _

source§

const WHITE: Rgb666 = _

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: Rgb888 = _

source§

const RED: Rgb888 = _

source§

const GREEN: Rgb888 = _

source§

const BLUE: Rgb888 = _

source§

const YELLOW: Rgb888 = _

source§

const MAGENTA: Rgb888 = _

source§

const CYAN: Rgb888 = _

source§

const WHITE: Rgb888 = _