[][src]Struct pixel_widgets::draw::Color

pub struct Color {
    pub r: f32,
    pub g: f32,
    pub b: f32,
    pub a: f32,
}

A color with red, green, blue and alpha components.

Fields

r: f32

The red component in [0.0-1.0] range.

g: f32

The green component in [0.0-1.0] range.

b: f32

The blue component in [0.0-1.0] range.

a: f32

The alpha component in [0.0-1.0] range.

Implementations

impl Color[src]

pub fn white() -> Color[src]

Returns the color white

pub fn black() -> Color[src]

Returns the color black

pub fn red() -> Color[src]

Returns the color red

pub fn green() -> Color[src]

Returns the color green

pub fn blue() -> Color[src]

Returns the color blue

pub fn with_alpha(self, a: f32) -> Self[src]

Modifies a color with a new alpha component

Trait Implementations

impl Clone for Color[src]

impl Copy for Color[src]

impl Debug 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> Any for T where
    T: Any

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

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

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DragDropId for T where
    T: 'static + Copy
[src]

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

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

impl<T> SetParameter for T

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.