BSD-3-Clause licensed by Alexey Kuleshevich
Maintained by

Module documentation for 0.2.0

This version can be pinned in stack with:Color-0.2.0@sha256:94c43c4d8f943ba0642ee58a9b8a665b01a3ac2893c40a16ffdabaacb956c58f,8159


A library for dealing with Colors and pixels. It implements arbitrary color space conversion, chromatic adaptation and other color manipulations.


Language Travis Azure Coveralls
GitHub top language Travis Build Status Coverage Status Join the chat at
Package Hackage Nightly LTS
Color Hackage Nightly Nightly


There is a clear separation between color models, color spaces and alternative representations of color spaces. All are distinct at the type level. The goal is to prevent mixups of incompatible color types as well as utilize type information for conversion between them.

Currently supported:

  • Color models:

    • Y
    • RGB
    • HSI
    • HSL
    • HSV
    • YCbCr
    • CMYK
  • Color spaces and arbitrary conversions between them:

    • Y - luminance

    • Y' - luma

    • CIE XYZ

    • CIE L*a*b*

    • RGB:

      • sRGB - both standardized and derived

      • AdobeRGB - both standardized and derived

      • ITU: Rec470, Rec601 and Rec709

      • Alternative representations:

        • HSI
        • HSL
        • HSV
        • YCbCr
        • CMYK
  • Illuminants:

    • CIE1931 - 2 degree observer
    • CIE1964 - 10 degree observer
    • Some common alternatives
  • Chromatic adaptation:

    • VonKries adaptation with transformations:

      • VonKries
      • Bradford (default)
      • Fairchild
      • CIECAM02
      • CMCCAT2000
  • Color Standards:

    • RAL

External resources


Changelog for Color


  • Add Linearity kind to RedGreenBlue color spaces.
  • Add Default instance for Pixel
  • Addition of universal division (//) to Elevator
  • Addition of CIE1931 RGB color space.
  • Fix show instance for floating point colors: adjust formatting in Elevator for Float and Double
  • Add record accessor functions: chromaticityCIExyY, whitePointChromaticity
  • Fix show instance for Gamut
  • Remove deprecated: CIECAM02 and ciecam02Adaptation


  • Export pixelColor
  • Add luma related patterns: PixelY', PixelY'A, Y' and Y'A. Also rgbPixelLuma

  • Fix introduced in 0.1.2 for Alpha cs was incomplete and is fixed in this version without breakage.

0.1.3 (deprecated)

  • Addition of CMCCAT2000.
  • Rename CIECAM02 to CIECAT02 with a fallback synonym for backwards compatibility
  • Fix ColorSpace instance for Alpha cs
  • Add ColorSpace instances for YCbCr cs color spaces that have Luma instance: BT709, BT601_525 and BT601_625


  • Fix YCbCr conversion to derived RGB color spaces
  • Fix conversion of toWord64 (1 :: Double) and toWord632 (1 :: Float).
  • Addition of xyzColorMatchingFunctions and spectralPowerDistributions


  • Addition of Graphics.Color.Illuminant.Wikipedia module
  • Addition of convertColor and convertColorFloat functions


Initial alpha release

Used by 1 package in nightly-2020-09-16(full list with versions):