[][src]Struct screen_13::color::Color

pub struct Color {
    pub b: u8,
    pub g: u8,
    pub r: u8,
}

A three channel color

Fields

b: u8

Blue channel

g: u8

Green channel

r: u8

Red channel

Implementations

impl Color[src]

pub const fn rgb(r: u8, g: u8, b: u8) -> Self[src]

Constructs a Color from the given values.

pub fn to_hex(self) -> String[src]

Returns a hexadecimal color code as a string.

pub fn to_rgb(self) -> Vec3[src]

Constructs a Vec3 from this color.

Trait Implementations

impl Clone for Color[src]

impl Copy for Color[src]

impl Debug for Color[src]

impl From<(u8, u8, u8)> for Color[src]

impl From<AlphaColor> for Color[src]

impl From<ClearValue> for Color[src]

impl From<Color> for AlphaColor[src]

impl From<Color> for ClearValue[src]

Auto Trait Implementations

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> Pointable for T

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.