colour-2.3.6: A model for human colour/color perception
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Colour.SRGB.Linear

Description

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

Synopsis

Documentation

data Colour a Source #

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

Instances details
ColourOps Colour Source # 
Instance details

Defined in Data.Colour.Internal

Methods

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

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

AffineSpace Colour Source # 
Instance details

Defined in Data.Colour.Internal

Methods

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

Eq a => Eq (Colour a) Source # 
Instance details

Defined in Data.Colour.Internal

Methods

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

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

(Fractional a, Read a) => Read (Colour a) Source # 
Instance details

Defined in Data.Colour

(Fractional a, Show a) => Show (Colour a) Source # 
Instance details

Defined in Data.Colour

Methods

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

show :: Colour a -> String #

showList :: [Colour a] -> ShowS #

Num a => Semigroup (Colour a) Source # 
Instance details

Defined in Data.Colour.Internal

Methods

(<>) :: Colour a -> Colour a -> Colour a #

sconcat :: NonEmpty (Colour a) -> Colour a #

stimes :: Integral b => b -> Colour a -> Colour a #

Num a => Monoid (Colour a) Source # 
Instance details

Defined in Data.Colour.Internal

Methods

mempty :: Colour a #

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

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

data RGB a Source #

An RGB triple for an unspecified colour space.

Constructors

RGB 

Fields

Instances

Instances details
Functor RGB Source # 
Instance details

Defined in Data.Colour.RGB

Methods

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

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

Applicative RGB Source # 
Instance details

Defined in Data.Colour.RGB

Methods

pure :: a -> RGB a #

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

liftA2 :: (a -> b -> c) -> RGB a -> RGB b -> RGB c #

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

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

Eq a => Eq (RGB a) Source # 
Instance details

Defined in Data.Colour.RGB

Methods

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

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

Read a => Read (RGB a) Source # 
Instance details

Defined in Data.Colour.RGB

Show a => Show (RGB a) Source # 
Instance details

Defined in Data.Colour.RGB

Methods

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

show :: RGB a -> String #

showList :: [RGB a] -> ShowS #

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

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

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

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

sRGBGamut :: RGBGamut Source #

This is the gamut for the sRGB colour space.