Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

Colour operations defined by the International Commission on Illumination (CIE).

- data Colour a
- cieXYZ :: Fractional a => a -> a -> a -> Colour a
- cieXYZView :: Fractional a => Colour a -> (a, a, a)
- luminance :: Fractional a => Colour a -> a
- toCIEXYZ :: Fractional a => Colour a -> (a, a, a)
- data Chromaticity a
- mkChromaticity :: Fractional a => a -> a -> Chromaticity a
- chromaCoords :: Fractional a => Chromaticity a -> (a, a, a)
- chromaX :: Fractional a => Chromaticity a -> a
- chromaY :: Fractional a => Chromaticity a -> a
- chromaZ :: Fractional a => Chromaticity a -> a
- chromaConvert :: (Fractional b, Real a) => Chromaticity a -> Chromaticity b
- chromaColour :: Fractional a => Chromaticity a -> a -> Colour a
- lightness :: (Ord a, Floating a) => Chromaticity a -> Colour a -> a
- cieLABView :: (Ord a, Floating a) => Chromaticity a -> Colour a -> (a, a, a)
- cieLAB :: (Ord a, Floating a) => Chromaticity a -> a -> a -> a -> Colour a

# Documentation

cieXYZ :: Fractional a => a -> a -> a -> Colour a Source #

Construct a `Colour`

from XYZ coordinates for the 2° standard
(colourimetric) observer.

cieXYZView :: Fractional a => Colour a -> (a, a, a) Source #

Returns the XYZ colour coordinates for the 2° standard (colourimetric) observer.

luminance :: Fractional a => Colour a -> a Source #

Returns the Y colour coordinate (luminance) for the 2° standard (colourimetric) observer.

toCIEXYZ :: Fractional a => Colour a -> (a, a, a) Source #

Deprecated: `toCIEXYZ`

has been renamed `cieXYZView`

data Chromaticity a Source #

Eq a => Eq (Chromaticity a) Source # | |

(Fractional a, Read a) => Read (Chromaticity a) Source # | |

(Fractional a, Show a) => Show (Chromaticity a) Source # | |

mkChromaticity :: Fractional a => a -> a -> Chromaticity a Source #

Constructs `Chromaticity`

from the CIE little *x*, little *y*
coordinates for the 2° standard (colourimetric) observer.

chromaCoords :: Fractional a => Chromaticity a -> (a, a, a) Source #

Returns the CIE little *x*, little *y*, little *z* coordinates
for the 2° standard (colourimetric) observer.

chromaX :: Fractional a => Chromaticity a -> a Source #

Returns the CIE little *x* coordinate
for the 2° standard (colourimetric) observer.

chromaY :: Fractional a => Chromaticity a -> a Source #

Returns the CIE little *y* coordinate
for the 2° standard (colourimetric) observer.

chromaZ :: Fractional a => Chromaticity a -> a Source #

Returns the CIE little *z* coordinate
for the 2° standard (colourimetric) observer.

chromaConvert :: (Fractional b, Real a) => Chromaticity a -> Chromaticity b Source #

Change the type used to represent the chromaticity coordinates.

:: Fractional a | |

=> Chromaticity a | |

-> a | |

-> Colour a |

Constructs a colour from the given `Chromaticity`

and `luminance`

.

:: (Ord a, Floating a) | |

=> Chromaticity a | White point |

-> Colour a | |

-> a |

Returns the lightness of a colour with respect to a given white point. Lightness is a perceptually uniform measure.

:: (Ord a, Floating a) | |

=> Chromaticity a | White point |

-> Colour a | |

-> (a, a, a) |

:: (Ord a, Floating a) | |

=> Chromaticity a | White point |

-> a | L* coordinate (lightness) |

-> a | a* coordinate |

-> a | b* coordinate |

-> Colour 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`

.