[][src]Struct pixel_canvas::color::Color

#[repr(C)]
pub struct Color {
    pub r: u8,
    pub g: u8,
    pub b: u8,
}

A single RGB-888 color.

Fields

r: u8

The red component.

g: u8

The green component.

b: u8

The blue component.

Methods

impl Color[src]

pub const BLACK: Color[src]

The color black.

pub const WHITE: Color[src]

The color white.

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

A convenience constructor for a color.

Trait Implementations

impl Blend<u8> for Color[src]

impl Blend<f32> for Color[src]

impl Default for Color[src]

impl Clone for Color[src]

impl Copy for Color[src]

impl Add<Color> for Color[src]

type Output = Color

The resulting type after applying the + operator.

impl Sub<Color> for Color[src]

type Output = Color

The resulting type after applying the - operator.

impl Mul<Color> for Color[src]

type Output = Color

The resulting type after applying the * operator.

impl Mul<u8> for Color[src]

type Output = Color

The resulting type after applying the * operator.

impl Mul<f32> for Color[src]

type Output = Color

The resulting type after applying the * operator.

Auto Trait Implementations

impl Send for Color

impl Unpin for Color

impl Sync for Color

impl UnwindSafe for Color

impl RefUnwindSafe for Color

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[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.

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

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

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

impl<T> Content for T where
    T: Copy
[src]

type Owned = T

A type that holds a sized version of the content.