pub struct Hsla { /* private fields */ }
Expand description
A color defined by hue, saturation, luminance, and alpha.
Implementations§
source§impl Hsla
impl Hsla
sourcepub fn new(
hue: Rational,
sat: Rational,
lum: Rational,
alpha: Rational,
hsla_format: bool
) -> Hsla
pub fn new( hue: Rational, sat: Rational, lum: Rational, alpha: Rational, hsla_format: bool ) -> Hsla
Create a new hsla color.
sourcepub fn alpha(&self) -> Rational
pub fn alpha(&self) -> Rational
Get the alpha value of this color.
Zero is fully transparent, one is fully opaque.
Trait Implementations§
source§impl Ord for Hsla
impl Ord for Hsla
source§impl PartialEq for Hsla
impl PartialEq for Hsla
source§impl PartialOrd for Hsla
impl PartialOrd for Hsla
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Hsla
impl StructuralEq for Hsla
impl StructuralPartialEq for Hsla
Auto Trait Implementations§
impl RefUnwindSafe for Hsla
impl Send for Hsla
impl Sync for Hsla
impl Unpin for Hsla
impl UnwindSafe for Hsla
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more