Skip to main content

Color

Trait Color 

Source
pub trait Color {
    // Required methods
    fn to_rgba(&self) -> (u8, u8, u8, u8);
    fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Self;
}
Expand description

A color that can be converted between an rgba tuple and back

Required Methods§

Source

fn to_rgba(&self) -> (u8, u8, u8, u8)

Source

fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§