colour-2.3.3: A model for human colour/color perception

Safe HaskellSafe
LanguageHaskell98

Data.Colour.SRGB.Linear

Description

Provides a linear colour space with the same gamut as Data.Colour.SRGB.

Synopsis

Documentation

data Colour a #

This type represents the human preception of colour. The a parameter is a numeric type used internally for the representation.

The Monoid instance allows one to add colours, but beware that adding colours can take you out of gamut. Consider using blend whenever possible.

Instances

ColourOps Colour # 

Methods

over :: Num a => AlphaColour a -> Colour a -> Colour a #

darken :: Num a => a -> Colour a -> Colour a #

AffineSpace Colour # 

Methods

affineCombo :: Num a => [(a, Colour a)] -> Colour a -> Colour a #

Eq a => Eq (Colour a) # 

Methods

(==) :: Colour a -> Colour a -> Bool #

(/=) :: Colour a -> Colour a -> Bool #

Num a => Monoid (Colour a) # 

Methods

mempty :: Colour a #

mappend :: Colour a -> Colour a -> Colour a #

mconcat :: [Colour a] -> Colour a #

data RGB a #

An RGB triple for an unspecified colour space.

Constructors

RGB 

Fields

Instances

Functor RGB # 

Methods

fmap :: (a -> b) -> RGB a -> RGB b #

(<$) :: a -> RGB b -> RGB a #

Applicative RGB # 

Methods

pure :: a -> RGB a #

(<*>) :: RGB (a -> b) -> RGB a -> RGB b #

(*>) :: RGB a -> RGB b -> RGB b #

(<*) :: RGB a -> RGB b -> RGB a #

Eq a => Eq (RGB a) # 

Methods

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

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

Read a => Read (RGB a) # 
Show a => Show (RGB a) # 

Methods

showsPrec :: Int -> RGB a -> ShowS #

show :: RGB a -> String #

showList :: [RGB a] -> ShowS #

rgb :: Fractional a => a -> a -> a -> Colour a #

Constructs a Colour from RGB values using the linear RGB colour with the same gamut as sRGB.

toRGB :: Fractional a => Colour a -> RGB a #

Return RGB values using the linear RGB colour with the same gamut as sRGB.

sRGBGamut :: RGBGamut #

This is the gamut for the sRGB colour space.