Struct bear_lib_terminal::Color [] [src]

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

An RGBA colour repr.

Fields

red: u8 green: u8 blue: u8 alpha: u8

Methods

impl Color
[src]

fn from_rgb(red: u8, green: u8, blue: u8) -> Self

Equivalent to from_rgba() with full opacity

fn from_rgba(red: u8, green: u8, blue: u8, alpha: u8) -> Self

Trait Implementations

impl PartialEq for Color
[src]

fn eq(&self, __arg_0: &Color) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Color) -> bool

This method tests for !=.

impl Hash for Color
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Eq for Color
[src]

impl Debug for Color
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for Color
[src]

impl Clone for Color
[src]

fn clone(&self) -> Color

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more