Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data RGB a = RGB {
- channelRed :: !a
- channelGreen :: !a
- channelBlue :: !a
- uncurryRGB :: (a -> a -> a -> b) -> RGB a -> b
- curryRGB :: (RGB a -> b) -> a -> a -> a -> b
- data RGBGamut = RGBGamut {
- primaries :: !(RGB (Chromaticity Rational))
- whitePoint :: !(Chromaticity Rational)
- mkRGBGamut :: RGB (Chromaticity Rational) -> Chromaticity Rational -> RGBGamut
- primaryMatrix :: Fractional a => RGB (Chromaticity a) -> [[a]]
- rgb2xyz :: RGBGamut -> [[Rational]]
- xyz2rgb :: RGBGamut -> [[Rational]]
- hslsv :: (Fractional a, Ord a) => RGB a -> (a, a, a, a, a)
- hue :: (Fractional a, Ord a) => RGB a -> a
- mod1 :: RealFrac t => t -> t
Documentation
An RGB triple for an unspecified colour space.
RGB | |
|
uncurryRGB :: (a -> a -> a -> b) -> RGB a -> b Source #
Uncurries a function expecting three r, g, b parameters.
curryRGB :: (RGB a -> b) -> a -> a -> a -> b Source #
Curries a function expecting one RGB parameter.
An RGBGamut
is a 3-D colour “cube” that contains all the
colours that can be displayed by a RGB device.
The “cube” is normalized so that white has
luminance
1.
RGBGamut | |
|
:: RGB (Chromaticity Rational) | The three primaries |
-> Chromaticity Rational | The white point |
-> RGBGamut |
An RGB gamut is specified by three primary colours (red, green, and
blue) and a white point (often d65
).
primaryMatrix :: Fractional a => RGB (Chromaticity a) -> [[a]] Source #