prizm-0.3.1.2: Compute with colors and differenct color spaces
Data.Prizm.Color.SRGB
Contents
Description
Transformation functions and convenience functions to do the base conversion between SRGB and CIEXYZ.
RGB
CIEXYZ
Synopsis
toXYZ :: RGB Integer -> CIEXYZ DoubleSource
Convert an SRGB value to a CIEXYZ value.
toXYZMatrix :: RGBtoXYZ -> RGB Integer -> CIEXYZ DoubleSource
Convert an SRGB value to a CIEXYZ given a pre-calculated illuminant matrix.
It is recommended to use toXYZ as it uses the most common illuminant matrix.
toXYZ
toHex :: RGB Integer -> HexSource
Convert an SRGB value to Hex.
Hex
fromHex :: Hex -> RGB IntegerSource
Convert a Hex to an SRGB.
clamp :: Integer -> IntegerSource
Clamp an integer with an upper-bound of 255 (the maximum RGB value).