Struct redox::Color [] [src]

pub struct Color {
    pub data: u32,
}

A color

Fields

data

Methods

impl Color

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

Create a new color from RGB

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

Set the alpha

const BLACK: Color = Color { data: 0xFF000000 }

const BLUE: Color = Color { data: 0xFF0000FF }

const GREEN: Color = Color { data: 0xFF00FF00 }

const RED: Color = Color { data: 0xFFFF0000 }

const WHITE: Color = Color { data: 0xFFFFFFFF }

Trait Implementations

Derived Implementations

impl Clone for Color

fn clone(&self) -> Color

fn clone_from(&mut self, source: &Self)

impl Copy for Color