Struct kernel::graphics::color::Color [] [src]

pub struct Color {
    pub data: u32,
}

A color

Fields

data

Methods

impl Color

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

Create a new color from RGB

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

Set the alpha

Trait Implementations

Derived Implementations

impl Clone for Color

fn clone(&self) -> Color

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

impl Copy for Color