-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A model for human colour/color perception -- -- This package provides a data type for colours and transparency. -- Colours can be blended and composed. Various colour spaces are -- supported. A module of colour names (Data.Colour.Names) is -- provided. @package colour @version 2.3.6 -- | Standard illuminants defined by the International Commission on -- Illumination (CIE). module Data.Colour.CIE.Illuminant -- | Incandescent / Tungsten a :: Fractional a => Chromaticity a -- | {obsolete} Direct sunlight at noon b :: Fractional a => Chromaticity a -- | {obsolete} Average / North sky Daylight c :: Fractional a => Chromaticity a -- | Horizon Light. ICC profile PCS d50 :: Fractional a => Chromaticity a -- | Mid-morning / Mid-afternoon Daylight d55 :: Fractional a => Chromaticity a -- | Noon Daylight: Television, sRGB color space d65 :: Fractional a => Chromaticity a -- | North sky Daylight d75 :: Fractional a => Chromaticity a -- | Equal energy e :: Fractional a => Chromaticity a -- | Daylight Fluorescent f1 :: Fractional a => Chromaticity a -- | Cool White Fluorescent f2 :: Fractional a => Chromaticity a -- | White Fluorescent f3 :: Fractional a => Chromaticity a -- | Warm White Fluorescent f4 :: Fractional a => Chromaticity a -- | Daylight Fluorescent f5 :: Fractional a => Chromaticity a -- | Lite White Fluorescent f6 :: Fractional a => Chromaticity a -- | D65 simulator, Daylight simulator f7 :: Fractional a => Chromaticity a -- | D50 simulator, Sylvania F40 Design 50 f8 :: Fractional a => Chromaticity a -- | Cool White Deluxe Fluorescent f9 :: Fractional a => Chromaticity a -- | Philips TL85, Ultralume 50 f10 :: Fractional a => Chromaticity a -- | Philips TL84, Ultralume 40 f11 :: Fractional a => Chromaticity a -- | Philips TL83, Ultralume 30 f12 :: Fractional a => Chromaticity a module Data.Colour.RGBSpace.HSL -- | An RGB triple for an unspecified colour space. data RGB a -- | Returns the HSL (hue-saturation-lightness) coordinates of an -- RGB triple. See hue, saturation, and -- lightness. hslView :: (Fractional a, Ord a) => RGB a -> (a, a, a) -- | The hue coordinate of an RGB value is in degrees. Its -- value is always in the range 0-360. hue :: (Fractional a, Ord a) => RGB a -> a -- | Returns the saturation coordinate (range [0, 1]) of an RGB -- triple for the HSL (hue-saturation-lightness) system. Note: This is -- different from saturation for the -- Data.Colour.RGBSpace.HSV saturation :: (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. lightness :: (Fractional a, Ord a) => RGB a -> 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]. hsl :: (RealFrac a, Ord a) => a -> a -> a -> RGB a module Data.Colour.RGBSpace.HSV -- | An RGB triple for an unspecified colour space. data RGB a -- | Returns the HSV (hue-saturation-value) coordinates of an RGB -- triple. See hue, saturation, and value. hsvView :: (Fractional a, Ord a) => RGB a -> (a, a, a) -- | The hue coordinate of an RGB value is in degrees. Its -- value is always in the range 0-360. hue :: (Fractional a, Ord a) => RGB a -> a -- | Returns the saturation coordinate (range [0,1]) of an RGB -- triple for the HSV (hue-saturation-value) system. Note: This is -- different from saturation for the -- Data.Colour.RGBSpace.HSL saturation :: (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. value :: (Fractional a, Ord a) => RGB a -> 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]. hsv :: (RealFrac a, Ord a) => a -> a -> a -> RGB a -- | Provides a linear colour space with the same gamut as -- Data.Colour.SRGB. module Data.Colour.SRGB.Linear -- | 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. data Colour a -- | An RGB triple for an unspecified colour space. data RGB a RGB :: !a -> !a -> !a -> RGB a [channelRed] :: RGB a -> !a [channelGreen] :: RGB a -> !a [channelBlue] :: RGB a -> !a -- | Constructs a Colour from RGB values using the linear RGB -- colour with the same gamut as sRGB. rgb :: Fractional a => a -> a -> a -> Colour a -- | Return RGB values using the linear RGB colour with the same -- gamut as sRGB. toRGB :: Fractional a => Colour a -> RGB a -- | This is the gamut for the sRGB colour space. sRGBGamut :: RGBGamut -- | An RGBSpace is characterized by Chromaticity for red, -- green, and blue, the Chromaticity of the white point, and it's -- TransferFunction. module Data.Colour.RGBSpace -- | 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. data Colour a -- | An RGB triple for an unspecified colour space. data RGB a RGB :: !a -> !a -> !a -> RGB a [channelRed] :: RGB a -> !a [channelGreen] :: RGB a -> !a [channelBlue] :: RGB a -> !a -- | Uncurries a function expecting three r, g, b parameters. uncurryRGB :: (a -> a -> a -> b) -> RGB a -> b -- | Curries a function expecting one RGB parameter. curryRGB :: (RGB a -> b) -> a -> a -> a -> b -- | An RGBGamut is a 3-D colour “cube” that contains all the -- colours that can be displayed by a RGB device. The “cube” is -- normalized so that white has luminance 1. data RGBGamut -- | An RGB gamut is specified by three primary colours (red, green, and -- blue) and a white point (often d65). mkRGBGamut :: RGB (Chromaticity Rational) -> Chromaticity Rational -> RGBGamut primaries :: RGBGamut -> RGB (Chromaticity Rational) whitePoint :: RGBGamut -> Chromaticity Rational -- | Returns True if the given colour lies inside the given gamut. inGamut :: (Ord a, Fractional a) => RGBGamut -> Colour a -> Bool -- | A transfer function is a function that typically translates -- linear colour space coordinates into non-linear coordinates. The -- transferInverse function reverses this by translating -- non-linear colour space coordinates into linear coordinates. It is -- required that -- --
-- transfer . transferInverse === id === transferInverse . inverse ---- -- (or that this law holds up to floating point rounding errors). -- -- We also require that transfer is approximately -- (**transferGamma) (and hence transferInverse is -- approximately (**(recip transferGamma))). The value -- transferGamma is for informational purposes only, so there is -- no bound on how good this approximation needs to be. data TransferFunction a TransferFunction :: (a -> a) -> (a -> a) -> a -> TransferFunction a [transfer] :: TransferFunction a -> a -> a [transferInverse] :: TransferFunction a -> a -> a [transferGamma] :: TransferFunction a -> a -- | This is the identity TransferFunction. linearTransferFunction :: Num a => TransferFunction a -- | This is the (**gamma) TransferFunction. powerTransferFunction :: Floating a => a -> TransferFunction a -- | This reverses a TransferFunction. inverseTransferFunction :: Fractional a => TransferFunction a -> TransferFunction a -- | An RGBSpace is a colour coordinate system for colours laying -- inGamut of gamut. Linear coordinates are passed through -- a transferFunction to produce non-linear RGB values. data RGBSpace a -- | An RGBSpace is specified by an RGBGamut and a -- TransferFunction. mkRGBSpace :: RGBGamut -> TransferFunction a -> RGBSpace a gamut :: RGBSpace a -> RGBGamut transferFunction :: RGBSpace a -> TransferFunction a -- | Produce a linear colour space from an RGBGamut. linearRGBSpace :: Num a => RGBGamut -> RGBSpace a -- | Create a Colour from red, green, and blue coordinates given in -- a general RGBSpace. rgbUsingSpace :: Fractional a => RGBSpace a -> a -> a -> a -> Colour a -- | Return the coordinates of a given Colour for a general -- RGBSpace. toRGBUsingSpace :: Fractional a => RGBSpace a -> Colour a -> RGB a instance GHC.Num.Num a => GHC.Base.Semigroup (Data.Colour.RGBSpace.TransferFunction a) instance GHC.Num.Num a => GHC.Base.Monoid (Data.Colour.RGBSpace.TransferFunction a) -- | Specifies Colours in accordance with the sRGB standard. module Data.Colour.SRGB -- | 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. data Colour a -- | An RGB triple for an unspecified colour space. data RGB a RGB :: !a -> !a -> !a -> RGB a [channelRed] :: RGB a -> !a [channelGreen] :: RGB a -> !a [channelBlue] :: RGB a -> !a -- | Construct a colour from a 24-bit (three 8-bit words) sRGB -- specification. sRGB24 :: (Ord b, Floating b) => Word8 -> Word8 -> Word8 -> Colour b -- | Construct a colour from an sRGB specification. Input components are -- expected to be in the range [0..maxBound]. sRGBBounded :: (Ord b, Floating b, Integral a, Bounded a) => a -> a -> a -> Colour b -- | Construct a colour from an sRGB specification. Input components are -- expected to be in the range [0..1]. sRGB :: (Ord b, Floating b) => b -> b -> b -> Colour b -- | Return the approximate 24-bit sRGB colour components as three 8-bit -- components. Out of range values are clamped. toSRGB24 :: (RealFrac b, Floating b) => Colour b -> RGB Word8 -- | Return the approximate sRGB colour components in the range -- [0..maxBound]. Out of range values are clamped. toSRGBBounded :: (RealFrac b, Floating b, Integral a, Bounded a) => Colour b -> RGB a -- | Return the sRGB colour components in the range [0..1]. toSRGB :: (Ord b, Floating b) => Colour b -> RGB b -- | Show a colour in hexadecimal form, e.g. "#00aaff" sRGB24shows :: (RealFrac b, Floating b) => Colour b -> ShowS -- | Show a colour in hexadecimal form, e.g. "#00aaff" sRGB24show :: (RealFrac b, Floating b) => Colour b -> String -- | Read a colour in hexadecimal form, e.g. "#00aaff" or "00aaff" sRGB24reads :: (Ord b, Floating b) => ReadS (Colour b) -- | Read a colour in hexadecimal form, e.g. "#00aaff" or "00aaff" sRGB24read :: (Ord b, Floating b) => String -> Colour b -- | The sRGB colour space sRGBSpace :: (Ord a, Floating a) => RGBSpace a -- | Datatypes for representing the human perception of colour. Includes -- common operations for blending and compositing colours. The most -- common way of creating colours is either by name (see -- Data.Colour.Names) or by giving an sRGB triple (see -- Data.Colour.SRGB). -- -- Methods of specifying Colours can be found in -- --
-- x `mappend` y == x `over` y ---- -- To get the (pre-multiplied) colour channel of an AlphaColour -- c, simply composite c over black. -- --
-- c `over` black --data AlphaColour a -- | Creates an opaque AlphaColour from a Colour. opaque :: Num a => Colour a -> AlphaColour a -- | Creates an AlphaColour from a Colour with a given -- opacity. -- --
-- c `withOpacity` o == dissolve o (opaque c) --withOpacity :: Num a => Colour a -> a -> AlphaColour a -- | This AlphaColour is entirely transparent and has no associated -- colour channel. transparent :: Num a => AlphaColour a -- | Change the type used to represent the colour coordinates. alphaColourConvert :: (Fractional b, Real a) => AlphaColour a -> AlphaColour b -- | Returns the opacity of an AlphaColour. alphaChannel :: AlphaColour a -> a class AffineSpace f -- | Compute a affine Combination (weighted-average) of points. The last -- parameter will get the remaining weight. e.g. -- --
-- affineCombo [(0.2,a), (0.3,b)] c == 0.2*a + 0.3*b + 0.5*c ---- -- Weights can be negative, or greater than 1.0; however, be aware that -- non-convex combinations may lead to out of gamut colours. affineCombo :: (AffineSpace f, Num a) => [(a, f a)] -> f a -> f a -- | Compute the weighted average of two points. e.g. -- --
-- blend 0.4 a b = 0.4*a + 0.6*b ---- -- The weight can be negative, or greater than 1.0; however, be aware -- that non-convex combinations may lead to out of gamut colours. blend :: (Num a, AffineSpace f) => a -> f a -> f a -> f a class ColourOps f -- | c1 `over` c2 returns the Colour created by compositing -- the AlphaColour c1 over c2, which may be -- either a Colour or AlphaColour. over :: (ColourOps f, Num a) => AlphaColour a -> f a -> f a -- | darken s c blends a colour with black without changing it's -- opacity. -- -- For Colour, darken s c = blend s c mempty darken :: (ColourOps f, Num a) => a -> f a -> f a -- | Returns an AlphaColour more transparent by a factor of -- o. dissolve :: Num a => a -> AlphaColour a -> AlphaColour a -- | c1 `atop` c2 returns the AlphaColour produced by -- covering the portion of c2 visible by c1. The -- resulting alpha channel is always the same as the alpha channel of -- c2. -- --
-- c1 `atop` (opaque c2) == c1 `over` (opaque c2) -- AlphaChannel (c1 `atop` c2) == AlphaChannel c2 --atop :: Fractional a => AlphaColour a -> AlphaColour a -> AlphaColour a instance (GHC.Real.Fractional a, GHC.Show.Show a) => GHC.Show.Show (Data.Colour.Internal.Colour a) instance (GHC.Real.Fractional a, GHC.Read.Read a) => GHC.Read.Read (Data.Colour.Internal.Colour a) instance (GHC.Real.Fractional a, GHC.Show.Show a, GHC.Classes.Eq a) => GHC.Show.Show (Data.Colour.Internal.AlphaColour a) instance (GHC.Real.Fractional a, GHC.Read.Read a) => GHC.Read.Read (Data.Colour.Internal.AlphaColour a) -- | Names for colours. Names taken from SVG 1.1 specification, -- http://www.w3.org/TR/SVG11/types.html#ColorKeywords. -- -- readColourName takes a string naming a colour (must be all -- lowercase) and returns the colour. Fails if the name is not -- recognized. module Data.Colour.Names readColourName :: (MonadFail m, Monad m, Ord a, Floating a) => String -> m (Colour a) aliceblue :: (Ord a, Floating a) => Colour a antiquewhite :: (Ord a, Floating a) => Colour a aqua :: (Ord a, Floating a) => Colour a aquamarine :: (Ord a, Floating a) => Colour a azure :: (Ord a, Floating a) => Colour a beige :: (Ord a, Floating a) => Colour a bisque :: (Ord a, Floating a) => Colour a black :: Num a => Colour a blanchedalmond :: (Ord a, Floating a) => Colour a blue :: (Ord a, Floating a) => Colour a blueviolet :: (Ord a, Floating a) => Colour a brown :: (Ord a, Floating a) => Colour a burlywood :: (Ord a, Floating a) => Colour a cadetblue :: (Ord a, Floating a) => Colour a chartreuse :: (Ord a, Floating a) => Colour a chocolate :: (Ord a, Floating a) => Colour a coral :: (Ord a, Floating a) => Colour a cornflowerblue :: (Ord a, Floating a) => Colour a cornsilk :: (Ord a, Floating a) => Colour a crimson :: (Ord a, Floating a) => Colour a cyan :: (Ord a, Floating a) => Colour a darkblue :: (Ord a, Floating a) => Colour a darkcyan :: (Ord a, Floating a) => Colour a darkgoldenrod :: (Ord a, Floating a) => Colour a darkgray :: (Ord a, Floating a) => Colour a darkgreen :: (Ord a, Floating a) => Colour a darkgrey :: (Ord a, Floating a) => Colour a darkkhaki :: (Ord a, Floating a) => Colour a darkmagenta :: (Ord a, Floating a) => Colour a darkolivegreen :: (Ord a, Floating a) => Colour a darkorange :: (Ord a, Floating a) => Colour a darkorchid :: (Ord a, Floating a) => Colour a darkred :: (Ord a, Floating a) => Colour a darksalmon :: (Ord a, Floating a) => Colour a darkseagreen :: (Ord a, Floating a) => Colour a darkslateblue :: (Ord a, Floating a) => Colour a darkslategray :: (Ord a, Floating a) => Colour a darkslategrey :: (Ord a, Floating a) => Colour a darkturquoise :: (Ord a, Floating a) => Colour a darkviolet :: (Ord a, Floating a) => Colour a deeppink :: (Ord a, Floating a) => Colour a deepskyblue :: (Ord a, Floating a) => Colour a dimgray :: (Ord a, Floating a) => Colour a dimgrey :: (Ord a, Floating a) => Colour a dodgerblue :: (Ord a, Floating a) => Colour a firebrick :: (Ord a, Floating a) => Colour a floralwhite :: (Ord a, Floating a) => Colour a forestgreen :: (Ord a, Floating a) => Colour a fuchsia :: (Ord a, Floating a) => Colour a gainsboro :: (Ord a, Floating a) => Colour a ghostwhite :: (Ord a, Floating a) => Colour a gold :: (Ord a, Floating a) => Colour a goldenrod :: (Ord a, Floating a) => Colour a gray :: (Ord a, Floating a) => Colour a grey :: (Ord a, Floating a) => Colour a green :: (Ord a, Floating a) => Colour a greenyellow :: (Ord a, Floating a) => Colour a honeydew :: (Ord a, Floating a) => Colour a hotpink :: (Ord a, Floating a) => Colour a indianred :: (Ord a, Floating a) => Colour a indigo :: (Ord a, Floating a) => Colour a ivory :: (Ord a, Floating a) => Colour a khaki :: (Ord a, Floating a) => Colour a lavender :: (Ord a, Floating a) => Colour a lavenderblush :: (Ord a, Floating a) => Colour a lawngreen :: (Ord a, Floating a) => Colour a lemonchiffon :: (Ord a, Floating a) => Colour a lightblue :: (Ord a, Floating a) => Colour a lightcoral :: (Ord a, Floating a) => Colour a lightcyan :: (Ord a, Floating a) => Colour a lightgoldenrodyellow :: (Ord a, Floating a) => Colour a lightgray :: (Ord a, Floating a) => Colour a lightgreen :: (Ord a, Floating a) => Colour a lightgrey :: (Ord a, Floating a) => Colour a lightpink :: (Ord a, Floating a) => Colour a lightsalmon :: (Ord a, Floating a) => Colour a lightseagreen :: (Ord a, Floating a) => Colour a lightskyblue :: (Ord a, Floating a) => Colour a lightslategray :: (Ord a, Floating a) => Colour a lightslategrey :: (Ord a, Floating a) => Colour a lightsteelblue :: (Ord a, Floating a) => Colour a lightyellow :: (Ord a, Floating a) => Colour a lime :: (Ord a, Floating a) => Colour a limegreen :: (Ord a, Floating a) => Colour a linen :: (Ord a, Floating a) => Colour a magenta :: (Ord a, Floating a) => Colour a maroon :: (Ord a, Floating a) => Colour a mediumaquamarine :: (Ord a, Floating a) => Colour a mediumblue :: (Ord a, Floating a) => Colour a mediumorchid :: (Ord a, Floating a) => Colour a mediumpurple :: (Ord a, Floating a) => Colour a mediumseagreen :: (Ord a, Floating a) => Colour a mediumslateblue :: (Ord a, Floating a) => Colour a mediumspringgreen :: (Ord a, Floating a) => Colour a mediumturquoise :: (Ord a, Floating a) => Colour a mediumvioletred :: (Ord a, Floating a) => Colour a midnightblue :: (Ord a, Floating a) => Colour a mintcream :: (Ord a, Floating a) => Colour a mistyrose :: (Ord a, Floating a) => Colour a moccasin :: (Ord a, Floating a) => Colour a navajowhite :: (Ord a, Floating a) => Colour a navy :: (Ord a, Floating a) => Colour a oldlace :: (Ord a, Floating a) => Colour a olive :: (Ord a, Floating a) => Colour a olivedrab :: (Ord a, Floating a) => Colour a orange :: (Ord a, Floating a) => Colour a orangered :: (Ord a, Floating a) => Colour a orchid :: (Ord a, Floating a) => Colour a palegoldenrod :: (Ord a, Floating a) => Colour a palegreen :: (Ord a, Floating a) => Colour a paleturquoise :: (Ord a, Floating a) => Colour a palevioletred :: (Ord a, Floating a) => Colour a papayawhip :: (Ord a, Floating a) => Colour a peachpuff :: (Ord a, Floating a) => Colour a peru :: (Ord a, Floating a) => Colour a pink :: (Ord a, Floating a) => Colour a plum :: (Ord a, Floating a) => Colour a powderblue :: (Ord a, Floating a) => Colour a purple :: (Ord a, Floating a) => Colour a red :: (Ord a, Floating a) => Colour a rosybrown :: (Ord a, Floating a) => Colour a royalblue :: (Ord a, Floating a) => Colour a saddlebrown :: (Ord a, Floating a) => Colour a salmon :: (Ord a, Floating a) => Colour a sandybrown :: (Ord a, Floating a) => Colour a seagreen :: (Ord a, Floating a) => Colour a seashell :: (Ord a, Floating a) => Colour a sienna :: (Ord a, Floating a) => Colour a silver :: (Ord a, Floating a) => Colour a skyblue :: (Ord a, Floating a) => Colour a slateblue :: (Ord a, Floating a) => Colour a slategray :: (Ord a, Floating a) => Colour a slategrey :: (Ord a, Floating a) => Colour a snow :: (Ord a, Floating a) => Colour a springgreen :: (Ord a, Floating a) => Colour a steelblue :: (Ord a, Floating a) => Colour a tan :: (Ord a, Floating a) => Colour a teal :: (Ord a, Floating a) => Colour a thistle :: (Ord a, Floating a) => Colour a tomato :: (Ord a, Floating a) => Colour a turquoise :: (Ord a, Floating a) => Colour a violet :: (Ord a, Floating a) => Colour a wheat :: (Ord a, Floating a) => Colour a white :: (Ord a, Floating a) => Colour a whitesmoke :: (Ord a, Floating a) => Colour a yellow :: (Ord a, Floating a) => Colour a yellowgreen :: (Ord a, Floating a) => Colour a -- | Colour operations defined by the International Commission on -- Illumination (CIE). module Data.Colour.CIE -- | 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. data Colour a -- | Construct a Colour from XYZ coordinates for the 2° standard -- (colourimetric) observer. cieXYZ :: Fractional a => a -> a -> a -> Colour a -- | Returns the XYZ colour coordinates for the 2° standard (colourimetric) -- observer. cieXYZView :: Fractional a => Colour a -> (a, a, a) -- | Returns the Y colour coordinate (luminance) for the 2° standard -- (colourimetric) observer. luminance :: Fractional a => Colour a -> a -- | Deprecated: toCIEXYZ has been renamed cieXYZView toCIEXYZ :: Fractional a => Colour a -> (a, a, a) data Chromaticity a -- | Constructs Chromaticity from the CIE little x, little -- y coordinates for the 2° standard (colourimetric) observer. mkChromaticity :: Fractional a => a -> a -> Chromaticity a -- | Returns the CIE little x, little y, little z -- coordinates for the 2° standard (colourimetric) observer. chromaCoords :: Fractional a => Chromaticity a -> (a, a, a) -- | Returns the CIE little x coordinate for the 2° standard -- (colourimetric) observer. chromaX :: Fractional a => Chromaticity a -> a -- | Returns the CIE little y coordinate for the 2° standard -- (colourimetric) observer. chromaY :: Fractional a => Chromaticity a -> a -- | Returns the CIE little z coordinate for the 2° standard -- (colourimetric) observer. chromaZ :: Fractional a => Chromaticity a -> a -- | Change the type used to represent the chromaticity coordinates. chromaConvert :: (Fractional b, Real a) => Chromaticity a -> Chromaticity b -- | Constructs a colour from the given Chromaticity and -- luminance. chromaColour :: Fractional a => Chromaticity a -> a -> Colour a -- | Returns the lightness of a colour with respect to a given white point. -- Lightness is a perceptually uniform measure. lightness :: (Ord a, Floating a) => Chromaticity a -> Colour a -> a -- | Returns the CIELAB coordinates of a colour, which is a perceptually -- uniform colour space. The first coordinate is lightness. If you -- don't know what white point to use, use d65. cieLABView :: (Ord a, Floating a) => Chromaticity a -> Colour a -> (a, a, a) -- | Returns the colour for given CIELAB coordinates, which is a -- perceptually uniform colour space. If you don't know what white point -- to use, use d65. cieLAB :: (Ord a, Floating a) => Chromaticity a -> a -> a -> a -> Colour a instance Data.Colour.Internal.AffineSpace Data.Colour.CIE.Chromaticity.Chromaticity