[][src]Trait colours::HasAlpha

pub trait HasAlpha: IsColor + Sized {
    type Alphaless: HasntAlpha + Sized;
    fn split_alpha(self) -> (Self::Alphaless, Self::Channel);

    fn without_alpha(self) -> Self::Alphaless { ... }
fn only_alpha(self) -> Self::Channel { ... } }

The color which has an alpha component

Associated Types

type Alphaless: HasntAlpha + Sized

The color of same kind but without alpha component

Loading content...

Required methods

fn split_alpha(self) -> (Self::Alphaless, Self::Channel)

Split alpha component from color

Loading content...

Provided methods

fn without_alpha(self) -> Self::Alphaless

Remove alpha component of color

fn only_alpha(self) -> Self::Channel

Extract alpha component from color

Loading content...

Implementors

impl<T: IsColorChannel> HasAlpha for Hsla<T>[src]

type Alphaless = Hsl<T>

impl<T: IsColorChannel> HasAlpha for Hsva<T>[src]

type Alphaless = Hsv<T>

impl<T: IsColorChannel> HasAlpha for Rgba<T>[src]

type Alphaless = Rgb<T>

Loading content...