Copyright | [2016..2020] Trevor L. McDonell |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <trevor.mcdonell@gmail.com> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Colours in the HSL (hue-saturation-lightness) cylindrical-coordinate representation of points in the RGB colour space.
Synopsis
- type Colour = HSL Float
- data HSL a = HSL a a a
- pattern HSL_ :: (Elt (HSL a), Elt a, VecElt a, EltR (HSL a) ~ Vec3 a) => Exp a -> Exp a -> Exp a -> Exp (HSL a)
- hsl :: Exp Float -> Exp Float -> Exp Float -> Exp Colour
- clamp :: Exp Colour -> Exp Colour
- toRGB :: Exp (HSL Float) -> Exp (RGB Float)
- fromRGB :: Exp (RGB Float) -> Exp (HSL Float)
- hue :: Exp (RGB Float) -> Exp Float
- saturation :: Exp (RGB Float) -> Exp Float
- lightness :: Exp (RGB Float) -> Exp Float
Documentation
HSL a a a |
Instances
pattern HSL_ :: (Elt (HSL a), Elt a, VecElt a, EltR (HSL a) ~ Vec3 a) => Exp a -> Exp a -> Exp a -> Exp (HSL a) Source #
:: Exp Float | hue component |
-> Exp Float | saturation component |
-> Exp Float | lightness component |
-> Exp Colour |
Construct a HSL colour value from the individual channel components. The hue component is measured in degrees and wrapped to the range [0..360), while the saturation and value are clamped to the range [0..1].
toRGB :: Exp (HSL Float) -> Exp (RGB Float) Source #
Convert a HSL colour to an RGB colour-space value