[][src]Struct screen_13::color::AlphaColor

pub struct AlphaColor {
    pub a: u8,
    pub b: u8,
    pub g: u8,
    pub r: u8,
}

A four channel (with alpha) color.

Fields

a: u8

Alpha channel.

b: u8

Blue channel.

g: u8

Green channel.

r: u8

Red channel.

Implementations

impl AlphaColor[src]

pub fn is_transparent(self) -> bool[src]

Returns true if the alpha channel is non-zero

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

Constructs an AlphaColor from the given values.

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

Constructs an AlphaColor from the given values.

pub fn to_rgba(self) -> Vec4[src]

Constructs a Vec4 from this color.

Trait Implementations

impl Clone for AlphaColor[src]

impl Copy for AlphaColor[src]

impl Debug for AlphaColor[src]

impl Default for AlphaColor[src]

impl Eq for AlphaColor[src]

impl From<AlphaColor> for ClearValue[src]

impl From<AlphaColor> for PackedColor[src]

impl From<AlphaColor> for Color[src]

impl From<Color> for AlphaColor[src]

impl Ord for AlphaColor[src]

impl PartialEq<AlphaColor> for AlphaColor[src]

impl PartialOrd<AlphaColor> for AlphaColor[src]

impl StructuralEq for AlphaColor[src]

impl StructuralPartialEq for AlphaColor[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.