HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecolour-2.3.6Haskell98

Data.Colour.RGBSpace.HSV

  • 1 type
  • 5 values
  • Packagecolour-2.3.6
  • 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.6 · Data.Colour.RGB
  • Applicative RGBDefined in colour-2.3.6 · Data.Colour.RGB
  • Eq a => Eq (RGB a)Defined in colour-2.3.6 · Data.Colour.RGB
  • Read a => Read (RGB a)Defined in colour-2.3.6 · Data.Colour.RGB
  • Show a => Show (RGB a)Defined in colour-2.3.6 · 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.

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

Returns the value coordinate (raonge [0,1]) of an RGB triple for the HSV (hue-saturation-value) system.

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

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