Struct color::AlphaColor[][src]

pub struct AlphaColor<T, C> {
    pub c: C,
    pub a: T,
}

Fields

c: Ca: T

Implementations

impl<T, C> AlphaColor<T, C>[src]

pub const fn new(c: C, a: T) -> AlphaColor<T, C>[src]

impl<T: Channel, S: TransferFunction> AlphaColor<T, Rgb<T, S>>[src]

pub fn from_hex(hex: u32) -> Rgba<T, S>[src]

pub fn rg(&self) -> Rg<T, S>[src]

pub fn rb(&self) -> Rg<T, S>[src]

pub fn gr(&self) -> Rg<T, S>[src]

pub fn gb(&self) -> Rg<T, S>[src]

pub fn br(&self) -> Rg<T, S>[src]

pub fn bg(&self) -> Rg<T, S>[src]

pub fn ar(&self) -> Rg<T, S>[src]

pub fn ag(&self) -> Rg<T, S>[src]

pub fn ab(&self) -> Rg<T, S>[src]

pub fn ra(&self) -> Rg<T, S>[src]

pub fn ga(&self) -> Rg<T, S>[src]

pub fn ba(&self) -> Rg<T, S>[src]

pub fn rgb(&self) -> Rgb<T, S>[src]

pub fn rbg(&self) -> Rgb<T, S>[src]

pub fn bgr(&self) -> Rgb<T, S>[src]

pub fn brg(&self) -> Rgb<T, S>[src]

pub fn grb(&self) -> Rgb<T, S>[src]

pub fn gbr(&self) -> Rgb<T, S>[src]

pub fn rga(&self) -> Rgb<T, S>[src]

pub fn rba(&self) -> Rgb<T, S>[src]

pub fn bra(&self) -> Rgb<T, S>[src]

pub fn bga(&self) -> Rgb<T, S>[src]

pub fn gra(&self) -> Rgb<T, S>[src]

pub fn gba(&self) -> Rgb<T, S>[src]

pub fn arg(&self) -> Rgb<T, S>[src]

pub fn arb(&self) -> Rgb<T, S>[src]

pub fn agr(&self) -> Rgb<T, S>[src]

pub fn agb(&self) -> Rgb<T, S>[src]

pub fn abr(&self) -> Rgb<T, S>[src]

pub fn abg(&self) -> Rgb<T, S>[src]

pub fn rag(&self) -> Rgb<T, S>[src]

pub fn rab(&self) -> Rgb<T, S>[src]

pub fn gar(&self) -> Rgb<T, S>[src]

pub fn gab(&self) -> Rgb<T, S>[src]

pub fn bar(&self) -> Rgb<T, S>[src]

pub fn bag(&self) -> Rgb<T, S>[src]

pub fn rgba(&self) -> Rgba<T, S>[src]

pub fn rbga(&self) -> Rgba<T, S>[src]

pub fn grba(&self) -> Rgba<T, S>[src]

pub fn gbra(&self) -> Rgba<T, S>[src]

pub fn brga(&self) -> Rgba<T, S>[src]

pub fn bgra(&self) -> Rgba<T, S>[src]

pub fn argb(&self) -> Rgba<T, S>[src]

pub fn arbg(&self) -> Rgba<T, S>[src]

pub fn agrb(&self) -> Rgba<T, S>[src]

pub fn agbr(&self) -> Rgba<T, S>[src]

pub fn abrg(&self) -> Rgba<T, S>[src]

pub fn abgr(&self) -> Rgba<T, S>[src]

pub fn ragb(&self) -> Rgba<T, S>[src]

pub fn rabg(&self) -> Rgba<T, S>[src]

pub fn garb(&self) -> Rgba<T, S>[src]

pub fn gabr(&self) -> Rgba<T, S>[src]

pub fn barg(&self) -> Rgba<T, S>[src]

pub fn bagr(&self) -> Rgba<T, S>[src]

pub fn rgab(&self) -> Rgba<T, S>[src]

pub fn rbag(&self) -> Rgba<T, S>[src]

pub fn grab(&self) -> Rgba<T, S>[src]

pub fn gbar(&self) -> Rgba<T, S>[src]

pub fn brag(&self) -> Rgba<T, S>[src]

pub fn bgar(&self) -> Rgba<T, S>[src]

impl<T: Channel, S: TransferFunction> AlphaColor<T, Rgb<T, S>>[src]

pub fn to_standard<S2: TransferFunction>(&self) -> Rgba<T, S2>[src]

pub fn to_linear(&self) -> Rgba<T, LinearRgb>[src]

Trait Implementations

impl<T: Channel + Add<T, Output = T>, C: Add<Output = C>> Add<AlphaColor<T, C>> for AlphaColor<T, C>[src]

type Output = AlphaColor<T, C>

The resulting type after applying the + operator.

impl<T, C: AsMut<[T; 3]>> AsMut<[T; 4]> for AlphaColor<T, C>[src]

impl<T, C: AsRef<[T; 3]>> AsRef<[T; 4]> for AlphaColor<T, C>[src]

impl<T, C: Borrow<[T; 3]>> Borrow<[T; 4]> for AlphaColor<T, C>[src]

impl<T, C: BorrowMut<[T; 3]>> BorrowMut<[T; 4]> for AlphaColor<T, C>[src]

impl<T: Clone, C: Clone> Clone for AlphaColor<T, C>[src]

impl<T: Channel, C: Color<T>> Color<T> for AlphaColor<T, C>[src]

fn clamp_s(self, lo: T, hi: T) -> AlphaColor<T, C>[src]

Clamps the components of the color to the range (lo,hi).

fn clamp_c(self, lo: AlphaColor<T, C>, hi: AlphaColor<T, C>) -> AlphaColor<T, C>[src]

Clamps the components of the color component-wise between lo and hi.

fn inverse(self) -> AlphaColor<T, C>[src]

Inverts the color.

impl<T: Debug, C: Debug> Debug for AlphaColor<T, C>[src]

impl<'de, T, C> Deserialize<'de> for AlphaColor<T, C> where
    T: Deserialize<'de>,
    C: Deserialize<'de>, 
[src]

impl<T: Channel, C: Div<Output = C>> Div<AlphaColor<T, C>> for AlphaColor<T, C>[src]

type Output = AlphaColor<T, C>

The resulting type after applying the / operator.

impl<T: Channel + Div<T, Output = T>, C: Div<T, Output = C>> Div<T> for AlphaColor<T, C>[src]

type Output = AlphaColor<T, C>

The resulting type after applying the / operator.

impl<T, C: AsRef<[T; 3]>> Index<usize> for AlphaColor<T, C>[src]

type Output = T

The returned type after indexing.

impl<T, C: AsRef<[T; 3]> + AsMut<[T; 3]>> IndexMut<usize> for AlphaColor<T, C>[src]

impl<T: Channel, C: Mul<Output = C>> Mul<AlphaColor<T, C>> for AlphaColor<T, C>[src]

type Output = AlphaColor<T, C>

The resulting type after applying the * operator.

impl<T: Channel + Mul<T, Output = T>, C: Mul<T, Output = C>> Mul<T> for AlphaColor<T, C>[src]

type Output = AlphaColor<T, C>

The resulting type after applying the * operator.

impl<T: PartialEq, C: PartialEq> PartialEq<AlphaColor<T, C>> for AlphaColor<T, C>[src]

impl<T: Channel + Saturating, C: Saturating> Saturating for AlphaColor<T, C>[src]

impl<T, C> Serialize for AlphaColor<T, C> where
    T: Serialize,
    C: Serialize
[src]

impl<T: Channel + Sub<T, Output = T>, C: Sub<Output = C>> Sub<AlphaColor<T, C>> for AlphaColor<T, C>[src]

type Output = AlphaColor<T, C>

The resulting type after applying the - operator.

impl<T, C: ToLuma> ToLuma for AlphaColor<T, C>[src]

type Standard = <C as ToLuma>::Standard

impl<T, C: ToRgb> ToRgb for AlphaColor<T, C>[src]

type Standard = <C as ToRgb>::Standard

impl<T: Channel, C: ToRgb> ToRgba for AlphaColor<T, C>[src]

type Standard = <C as ToRgb>::Standard

impl<T: Copy, C: Copy> Copy for AlphaColor<T, C>[src]

impl<T: Eq, C: Eq> Eq for AlphaColor<T, C>[src]

impl<T, C> StructuralEq for AlphaColor<T, C>[src]

impl<T, C> StructuralPartialEq for AlphaColor<T, C>[src]

Auto Trait Implementations

impl<T, C> RefUnwindSafe for AlphaColor<T, C> where
    C: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, C> Send for AlphaColor<T, C> where
    C: Send,
    T: Send

impl<T, C> Sync for AlphaColor<T, C> where
    C: Sync,
    T: Sync

impl<T, C> Unpin for AlphaColor<T, C> where
    C: Unpin,
    T: Unpin

impl<T, C> UnwindSafe for AlphaColor<T, C> where
    C: UnwindSafe,
    T: UnwindSafe

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<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]