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.SRGB.Linear

Provides a linear colour space with the same gamut as Data.Colour.SRGB.

  • 2 types
  • 3 values
  • Packagecolour-2.3.6
  • Exports5
  • LanguageHaskell98
  • LicenceMIT
  • SourceLinear.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
valuergb :: Fractional a => a -> a -> a -> Colour a
#

Constructs a Colour from RGB values using the linear RGB colour with the same gamut as sRGB.

valuetoRGB :: Fractional a => Colour a -> RGB a
#

Return RGB values using the linear RGB colour with the same gamut as sRGB.