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

pub struct Color {
    pub red: u8,
    pub green: u8,
    pub blue: u8,
    pub alpha: u8,
}

A color.

Fields

red: u8green: u8blue: u8alpha: u8

Methods

impl Color[src]

pub fn new(red: u8, green: u8, blue: u8) -> Color[src]

Create a color with a alpha value of 255

pub fn new_with_alpha(red: u8, green: u8, blue: u8, alpha: u8) -> Color[src]

Create a color

pub fn green() -> Color[src]

Green color

pub fn yellow() -> Color[src]

Yellow color

pub fn orange() -> Color[src]

Orange color

pub fn red() -> Color[src]

Red color

pub fn blue() -> Color[src]

Blue color

pub fn cyan() -> Color[src]

Cyan color

pub fn grey() -> Color[src]

Grey color

pub fn pink() -> Color[src]

Pink color

pub fn purple() -> Color[src]

Purple color

pub fn black() -> Color[src]

No color

pub fn white() -> Color[src]

Pure white

Trait Implementations

impl Debug for Color[src]

impl ToString for Color[src]

Auto Trait Implementations

impl RefUnwindSafe for Color

impl Send for Color

impl Sync for Color

impl Unpin for Color

impl UnwindSafe for Color

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.