prizm-0.3.1.1: Compute with colors and differenct color spaces

Stabilitystable
MaintainerParnell Springmeyer <parnell@ixmat.us>
Safe HaskellNone

Data.Prizm.Color.CIE.XYZ

Contents

Description

Transformation functions and convenience functions, some imported from the other modules to ease conversion between representations.

Synopsis

Transform to

RGB or Hex

toRGB :: CIEXYZ Double -> RGB IntegerSource

Convert a CIE color to an SRGB color.

This function uses the default d65 illuminant matrix.

toRGBMatrix :: XYZtoRGB -> CIEXYZ Double -> RGB IntegerSource

Convert an XYZ color to an SRGB color.

XYZtoRGB is the pre-calculated illuminant matrix, it is preferable to use toRG as it uses the most common one.

toHex :: CIEXYZ Double -> HexSource

Convenience function to convert XYZ to HEX.

CIE LAB or LCH

toLAB :: CIEXYZ Double -> CIELAB DoubleSource

Convert an XYZ color to a LAB color.

This function uses the default reference white (2deg observer, d65 illuminant).

toLCH :: CIEXYZ Double -> CIELCH DoubleSource

Convenience function to convert XYZ to LAB.

Transform from

RGB or Hex

fromRGB :: RGB Integer -> CIEXYZ DoubleSource

Convenience function to convert RGB to XYZ.

fromHex :: Hex -> CIEXYZ DoubleSource

Convenience function to convert HEX to XYZ.

CIE LAB or LCH

fromLAB :: CIELAB Double -> CIEXYZ DoubleSource

Convenience function to convert LAB to XYZ.

fromLCH :: CIELCH Double -> CIEXYZ DoubleSource

Convenience function to convert LCH to XYZ.