[][src]Struct hsl_ish::hsl::Hsl

pub struct Hsl {
    pub h: f64,
    pub s: f64,
    pub l: f64,

A dead simple implementation of the Hsl color space for degrees.


h: f64

Hue [0.0, 360.0] deg

s: f64

Saturation [0.0, 1.0]

l: f64

Lumination [0.0, 1.0]


impl Hsl[src]

pub fn new(h: f64, s: f64, l: f64) -> Hsl[src]

Trait Implementations

impl Debug for Hsl[src]

impl From<Hsl> for Rgb[src]

fn from(hsl: Hsl) -> Self[src]

Converts from the HSL to the RGB color space.


use hsl_ish::{Hsl, Rgb};
let hsl = Hsl::new(120.0, 1.0, 0.5);
let rgb = Rgb::from(hsl);
assert_eq!((rgb.r, rgb.g, rgb.b), (0, 255, 0));

Auto Trait Implementations

impl RefUnwindSafe for Hsl

impl Send for Hsl

impl Sync for Hsl

impl Unpin for Hsl

impl UnwindSafe for Hsl

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

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

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.