logo
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; }
Expand description

RGB color.

Associated Constants

The maximum value in the red channel.

The maximum value in the green channel.

The maximum value in the blue channel.

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

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

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

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

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

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

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

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

Required methods

Returns the red channel value.

Returns the green channel value.

Returns the blue channel value.

Implementors