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 HSV (hue-saturation-value) cylindrical-coordinate representation of points in the RGB colour space.
Synopsis
- type Colour = HSV Float
- data HSV a = HSV a a a
- pattern HSV_ :: (Elt (HSV a), Elt a, VecElt a, EltR (HSV a) ~ Vec3 a) => Exp a -> Exp a -> Exp a -> Exp (HSV a)
- hsv :: Exp Float -> Exp Float -> Exp Float -> Exp Colour
- clamp :: Exp Colour -> Exp Colour
- toRGB :: Exp (HSV Float) -> Exp (RGB Float)
- fromRGB :: Exp (RGB Float) -> Exp (HSV Float)
- hue :: Exp (RGB Float) -> Exp Float
- saturation :: Exp (RGB Float) -> Exp Float
- value :: Exp (RGB Float) -> Exp Float
Documentation
HSV a a a |
Instances
pattern HSV_ :: (Elt (HSV a), Elt a, VecElt a, EltR (HSV a) ~ Vec3 a) => Exp a -> Exp a -> Exp a -> Exp (HSV a) Source #
Construct a HSV 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 (HSV Float) -> Exp (RGB Float) Source #
Convert a HSV colour to an RGB colour-space value