prizm-1.0.3: Color transformations in different color spaces

Copyright(C) 2013 Parnell Springmeyer
LicenseBSD3
MaintainerParnell Springmeyer <parnell@digitalmentat.com>
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

Data.Prizm.Color.SRGB

Contents

Description

Transformation functions and convenience functions to do the base conversion between SRGB and CIEXYZ.

Synopsis

Documentation

clamp :: Word8 -> Word8 Source #

Clamp a Word8 with an upper-bound of 255 (the maximum RGB value).

parse :: Text -> RGB Source #

Parse a Hex into an sRGB type.

showRGB :: RGB -> Hex Source #

Show a colour in hexadecimal form, e.g. #00aaff

toXYZMatrix :: RGBtoXYZ -> RGB -> CIEXYZ Source #

Convert an sRGB value to a CIEXYZ given a pre-calculated illuminant matrix.

transform :: Integer -> Double Source #

Transform an RGB integer to be computed against a matrix.

Orphan instances