HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulecolour-2.3.7Haskell98

Data.Colour.RGBSpace.HSL

  • 1 type
  • 5 values
  • Packagecolour-2.3.7
  • Exports6
  • LanguageHaskell98
  • LicenceMIT
  • SourceRGB.hs
datadata RGB a
#

An RGB triple for an unspecified colour space.

Instances5Functor, Applicative, Eq, Read, Show
  • Functor RGBDefined in colour-2.3.7 · Data.Colour.RGB
  • Applicative RGBDefined in colour-2.3.7 · Data.Colour.RGB
  • Eq a => Eq (RGB a)Defined in colour-2.3.7 · Data.Colour.RGB
  • Read a => Read (RGB a)Defined in colour-2.3.7 · Data.Colour.RGB
  • Show a => Show (RGB a)Defined in colour-2.3.7 · Data.Colour.RGB
valuehue :: (Fractional a, Ord a) => RGB a -> a
#

The hue coordinate of an RGB value is in degrees. Its value is always in the range 0-360.

valuelightness :: (Fractional a, Ord a) => RGB a -> a
#

Returns the lightness coordinate (range [0, 1]) of an RGB triple for the HSL (hue-saturation-lightness) system.

valuehsl :: (RealFrac a, Ord a) => a -> a -> a -> RGB a
#

Convert HSL (hue-saturation-lightness) coordinates to an RGB value. Hue is expected to be measured in degrees [0,360], while saturation and lightness are expected to be in the closed range [0,1].