prizm-2.0.0: Convert colors to different color spaces, interpolate colors, and transform colors

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

Data.Prizm.Color.RGB

Contents

Description

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

Synopsis

Documentation

clamp :: Integral a => a -> a Source #

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

data RGB Source #

A color in the sRGB color space.

Constructors

RGB !Word8 !Word8 !Word8 

Instances

Eq RGB Source # 

Methods

(==) :: RGB -> RGB -> Bool #

(/=) :: RGB -> RGB -> Bool #

Ord RGB Source # 

Methods

compare :: RGB -> RGB -> Ordering #

(<) :: RGB -> RGB -> Bool #

(<=) :: RGB -> RGB -> Bool #

(>) :: RGB -> RGB -> Bool #

(>=) :: RGB -> RGB -> Bool #

max :: RGB -> RGB -> RGB #

min :: RGB -> RGB -> RGB #

Show RGB Source # 

Methods

showsPrec :: Int -> RGB -> ShowS #

show :: RGB -> String #

showList :: [RGB] -> ShowS #

MonoFunctor RGB Source # 

Methods

omap :: (Element RGB -> Element RGB) -> RGB -> RGB #

type Element RGB Source # 

Orphan instances