Skip to main content

Color

Trait Color 

Source
pub trait Color {
    // Required methods
    fn red(&self) -> u8;
    fn green(&self) -> u8;
    fn blue(&self) -> u8;
    fn alpha(&self) -> u8;
    fn pack(&self) -> u32;
}

Required Methods§

Source

fn red(&self) -> u8

Source

fn green(&self) -> u8

Source

fn blue(&self) -> u8

Source

fn alpha(&self) -> u8

Source

fn pack(&self) -> u32

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Color for u32

Source§

fn red(&self) -> u8

Source§

fn green(&self) -> u8

Source§

fn blue(&self) -> u8

Source§

fn alpha(&self) -> u8

Source§

fn pack(&self) -> u32

Implementors§