HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecolour-2.3.6Haskell98

Data.Colour.SRGB

Specifies Colours in accordance with the sRGB standard.

  • 2 types
  • 11 values
  • Packagecolour-2.3.6
  • Exports13
  • LanguageHaskell98
  • LicenceMIT
  • SourceSRGB.hs
datadata Colour a
#

This type represents the human preception of colour. The a parameter is a numeric type used internally for the representation.

The Monoid instance allows one to add colours, but beware that adding colours can take you out of gamut. Consider using blend whenever possible.

Instances7AffineSpace, ColourOps, Eq, Read, Show, Semigroup, …
datadata RGB a
#

An RGB triple for an unspecified colour space.

Constructors

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
valuesRGB :: (Ord b, Floating b) => b -> b -> b -> Colour b
#

Construct a colour from an sRGB specification. Input components are expected to be in the range [0..1].