Safe Haskell | Safe-Inferred |
---|
Support for the "sRGB" colour space.
This colour space is the de facto standard colour space for computer data, unless some more specific colour space is explicitly specified. Unless you know differently, any image data received from the outside world is probably sRGB, and and data output is probably expected to be sRGB.
Unfortunately, sRGB is a non-linear colour space, so it is not feasible to perform arithmetic in it directly. (The sRGB colour space basically standardises the defective non-linear behaviour of obsolete CRT display technology.)
- newtype Colour_sRGB = Colour_sRGB Colour
- newtype Colour8_sRGB = Colour8_sRGB Colour8
- colour_to_sRGB :: Colour -> Colour_sRGB
- cdemote_sRGB :: Colour_sRGB -> Colour8_sRGB
- cpromote_sRGB :: Colour8_sRGB -> Colour_sRGB
- colour_from_sRGB :: Colour_sRGB -> Colour
Types
newtype Colour_sRGB Source
newtype Colour8_sRGB Source
Conversions
colour_to_sRGB :: Colour -> Colour_sRGBSource
Convert a linear RGB value into a non-linear sRGB value.
colour_from_sRGB :: Colour_sRGB -> ColourSource
Convert a non-linear sRGB value into a linear RGB value.