pub struct HSLColor<T, A = T> {
pub h: T,
pub s: T,
pub l: T,
pub a: A,
}
Expand description
A color in HSLA color space with 32-bit floating point components.
Fields§
§h: T
Hue is a percent on the color wheel from [0, 1)
.
0 is red, 1/3 is green, 2/3 is blue.
s: T
Saturation is a percentage value in [0, 1]
.
0% means a shade of gray and 100% is the full color_parser.
l: T
Lightness is a percentage value in [0, 1]
.
0% is black, 100% is white.
a: A
Alpha is a percentage value in [0, 1]
.
0% is transparent, 100% is opaque.
Implementations§
Trait Implementations§
Source§impl<T, A> PartialOrd for HSLColor<T, A>where
T: PartialOrd,
A: PartialOrd,
impl<T, A> PartialOrd for HSLColor<T, A>where
T: PartialOrd,
A: PartialOrd,
impl<T, A> Copy for HSLColor<T, A>
impl<T, A> StructuralPartialEq for HSLColor<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for HSLColor<T, A>
impl<T, A> RefUnwindSafe for HSLColor<T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
impl<T, A> Send for HSLColor<T, A>
impl<T, A> Sync for HSLColor<T, A>
impl<T, A> Unpin for HSLColor<T, A>
impl<T, A> UnwindSafe for HSLColor<T, A>where
T: UnwindSafe,
A: UnwindSafe,
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