Struct rsass::value::Hwba[][src]

pub struct Hwba { /* fields omitted */ }

A color defined by hue, whiteness, blackness, and alpha.

All components are rational numbers. The hue is in degrees (0..360). The whiteness, blackness, and alpha are all in the zero to one range (inclusive), whith the additional invariant that whiteness + blackness will never be more than one.

Implementations

impl Hwba[src]

pub fn new(hue: Rational, w: Rational, b: Rational, alpha: Rational) -> Hwba[src]

Create a new hwba color value.

Hue is modulo 360 degrees. Other inputs will be clamped to their ranges.

pub fn hue(&self) -> Rational[src]

Get the hue of this color.

pub fn whiteness(&self) -> Rational[src]

Get the whiteness of this color.

Zero is no whiteness, one means this color is white.

pub fn blackness(&self) -> Rational[src]

Get the black of this color.

Zero is no blackness, one means this color is black.

pub fn alpha(&self) -> Rational[src]

Get the alpha value of this color.

Zero is fully transparent, one is fully opaque.

pub fn set_alpha(&mut self, alpha: Rational)[src]

Set the alpha value of this color.

Zero is fully transparent, one is fully opaque.

Trait Implementations

impl Clone for Hwba[src]

impl Debug for Hwba[src]

impl Eq for Hwba[src]

impl From<&'_ Hsla> for Hwba[src]

impl From<&'_ Hwba> for Rgba[src]

impl From<&'_ Hwba> for Hsla[src]

impl From<&'_ Rgba> for Hwba[src]

impl From<Hwba> for Color[src]

impl Ord for Hwba[src]

impl PartialEq<Hwba> for Hwba[src]

impl PartialOrd<Hwba> for Hwba[src]

impl StructuralEq for Hwba[src]

impl StructuralPartialEq for Hwba[src]

Auto Trait Implementations

impl RefUnwindSafe for Hwba

impl Send for Hwba

impl Sync for Hwba

impl Unpin for Hwba

impl UnwindSafe for Hwba

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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<V, T> VZip<V> for T where
    V: MultiLane<T>,