Color-0.3.3: Color spaces and conversions between them
Copyright(c) Alexey Kuleshevich 2019-2020
LicenseBSD3
MaintainerAlexey Kuleshevich <lehins@yandex.ru>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Graphics.Color.Space.RGB.AdobeRGB

Description

 
Synopsis

Constructors for a AdobeRGB color space.

pattern AdobeRGB :: Color RGB e -> Color (AdobeRGB l) e Source #

pattern ColorAdobeRGB :: e -> e -> e -> Color (AdobeRGB l) e Source #

Constructor for a color in AdobeRGB color space

Since: 0.1.0

pattern ColorAdobeRGBA :: e -> e -> e -> e -> Color (Alpha (AdobeRGB l)) e Source #

Constructor for a color in AdobeRGB color space with alpha channel

Since: 0.1.0

data AdobeRGB (l :: Linearity) Source #

A very common AdobeRGB (1998) color space with:

  • D65 illuminant
  • Transfer function:

\[ \gamma(u) = u^{2.19921875} = u^\frac{563}{256} \]

  • Inverse transfer function:

\[ \gamma^{-1}(u) = u^\frac{1}{2.19921875} = u^\frac{256}{563} \]

  • Normalized primary matrix:
>>> :set -XDataKinds
>>> import Graphics.Color.Space.RGB.AdobeRGB
>>> npm :: NPM AdobeRGB Float
[ [ 0.57667000, 0.18556000, 0.18823000 ]
, [ 0.29734000, 0.62736000, 0.07529000 ]
, [ 0.02703000, 0.07069000, 0.99134000 ] ]
  • Inverse normalized primary matrix:
>>> :set -XDataKinds
>>> import Graphics.Color.Space.RGB.AdobeRGB
>>> inpm :: INPM AdobeRGB Float
[ [ 2.04159000,-0.56501000,-0.34473000 ]
, [-0.96924000, 1.87597000, 0.04156000 ]
, [ 0.01344000,-0.11836000, 1.01517000 ] ]

Since: 0.1.0

Instances

Instances details
Functor (Color (AdobeRGB l)) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

fmap :: (a -> b) -> Color (AdobeRGB l) a -> Color (AdobeRGB l) b #

(<$) :: a -> Color (AdobeRGB l) b -> Color (AdobeRGB l) a #

Applicative (Color (AdobeRGB l)) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

pure :: a -> Color (AdobeRGB l) a #

(<*>) :: Color (AdobeRGB l) (a -> b) -> Color (AdobeRGB l) a -> Color (AdobeRGB l) b #

liftA2 :: (a -> b -> c) -> Color (AdobeRGB l) a -> Color (AdobeRGB l) b -> Color (AdobeRGB l) c #

(*>) :: Color (AdobeRGB l) a -> Color (AdobeRGB l) b -> Color (AdobeRGB l) b #

(<*) :: Color (AdobeRGB l) a -> Color (AdobeRGB l) b -> Color (AdobeRGB l) a #

Foldable (Color (AdobeRGB l)) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

fold :: Monoid m => Color (AdobeRGB l) m -> m #

foldMap :: Monoid m => (a -> m) -> Color (AdobeRGB l) a -> m #

foldMap' :: Monoid m => (a -> m) -> Color (AdobeRGB l) a -> m #

foldr :: (a -> b -> b) -> b -> Color (AdobeRGB l) a -> b #

foldr' :: (a -> b -> b) -> b -> Color (AdobeRGB l) a -> b #

foldl :: (b -> a -> b) -> b -> Color (AdobeRGB l) a -> b #

foldl' :: (b -> a -> b) -> b -> Color (AdobeRGB l) a -> b #

foldr1 :: (a -> a -> a) -> Color (AdobeRGB l) a -> a #

foldl1 :: (a -> a -> a) -> Color (AdobeRGB l) a -> a #

toList :: Color (AdobeRGB l) a -> [a] #

null :: Color (AdobeRGB l) a -> Bool #

length :: Color (AdobeRGB l) a -> Int #

elem :: Eq a => a -> Color (AdobeRGB l) a -> Bool #

maximum :: Ord a => Color (AdobeRGB l) a -> a #

minimum :: Ord a => Color (AdobeRGB l) a -> a #

sum :: Num a => Color (AdobeRGB l) a -> a #

product :: Num a => Color (AdobeRGB l) a -> a #

Traversable (Color (AdobeRGB l)) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

traverse :: Applicative f => (a -> f b) -> Color (AdobeRGB l) a -> f (Color (AdobeRGB l) b) #

sequenceA :: Applicative f => Color (AdobeRGB l) (f a) -> f (Color (AdobeRGB l) a) #

mapM :: Monad m => (a -> m b) -> Color (AdobeRGB l) a -> m (Color (AdobeRGB l) b) #

sequence :: Monad m => Color (AdobeRGB l) (m a) -> m (Color (AdobeRGB l) a) #

(Typeable l, Elevator e) => ColorModel (AdobeRGB l) e Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Associated Types

type Components (AdobeRGB l) e Source #

RedGreenBlue AdobeRGB D65 Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Elevator e => ColorSpace (AdobeRGB 'Linear) D65 e Source #

AdobeRGB linear color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Associated Types

type BaseModel (AdobeRGB 'Linear) Source #

type BaseSpace (AdobeRGB 'Linear) Source #

Elevator e => ColorSpace (AdobeRGB 'NonLinear) D65 e Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

ColorSpace (AdobeRGB l) D65 e => ColorSpace (CMYK (AdobeRGB l)) D65 e Source #

CMYK representation for AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (AdobeRGB l)) Source #

type BaseSpace (CMYK (AdobeRGB l)) Source #

Eq e => Eq (Color (AdobeRGB l) e) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

(==) :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Bool #

(/=) :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Bool #

Ord e => Ord (Color (AdobeRGB l) e) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

compare :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Ordering #

(<) :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Bool #

(<=) :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Bool #

(>) :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Bool #

(>=) :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Bool #

max :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Color (AdobeRGB l) e #

min :: Color (AdobeRGB l) e -> Color (AdobeRGB l) e -> Color (AdobeRGB l) e #

(Typeable l, Elevator e) => Show (Color (AdobeRGB l) e) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

showsPrec :: Int -> Color (AdobeRGB l) e -> ShowS #

show :: Color (AdobeRGB l) e -> String #

showList :: [Color (AdobeRGB l) e] -> ShowS #

Storable e => Storable (Color (AdobeRGB l) e) Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Methods

sizeOf :: Color (AdobeRGB l) e -> Int #

alignment :: Color (AdobeRGB l) e -> Int #

peekElemOff :: Ptr (Color (AdobeRGB l) e) -> Int -> IO (Color (AdobeRGB l) e) #

pokeElemOff :: Ptr (Color (AdobeRGB l) e) -> Int -> Color (AdobeRGB l) e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Color (AdobeRGB l) e) #

pokeByteOff :: Ptr b -> Int -> Color (AdobeRGB l) e -> IO () #

peek :: Ptr (Color (AdobeRGB l) e) -> IO (Color (AdobeRGB l) e) #

poke :: Ptr (Color (AdobeRGB l) e) -> Color (AdobeRGB l) e -> IO () #

newtype Color (AdobeRGB l) e Source # 
Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

newtype Color (AdobeRGB l) e = AdobeRGB (Color RGB e)
type BaseModel (AdobeRGB 'Linear) Source # 
Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

type BaseModel (AdobeRGB 'NonLinear) Source # 
Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

type BaseSpace (AdobeRGB 'Linear) Source # 
Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

type BaseSpace (AdobeRGB 'NonLinear) Source # 
Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

type Components (AdobeRGB l) e Source # 
Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

type Components (AdobeRGB l) e = (e, e, e)
type BaseModel (CMYK (AdobeRGB l)) Source # 
Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

type BaseSpace (CMYK (AdobeRGB l)) Source # 
Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

data D65 Source #

Whitepoint D65 that is so commonly used for sRGB and other color spaces defined by ITU: Rec.601 (525 and 625) and Rec.709 standards. It is slightly different than D65 that is defined by CIE1931 and D65 specified in Rec.470.

>>> whitePoint :: WhitePoint D65 Float
WhitePoint (Chromaticity {chromaticityCIExyY = <CIExyY * D65:( 0.31270000, 0.32900000)>})
>>> whitePointTristimulus :: Color (XYZ D65) Float
<XYZ * D65:( 0.95045596, 1.00000000, 1.08905770)>
>>> colorTemperature :: CCT D65
CCT {unCCT = 6504.0}

Since: 0.1.0

Instances

Instances details
Illuminant D65 Source #

[x=0.3127, y=0.3290] - Rec. ITU-R BT.601-7, Rec. ITU-R BT.709-6, IEC 61966-2-1:1999

Instance details

Defined in Graphics.Color.Illuminant.ITU.Rec601

Associated Types

type Temperature D65 :: n Source #

RedGreenBlue BT601_625 D65 Source #

ITU-R BT.601 (625) color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec601

RedGreenBlue BT601_525 D65 Source #

ITU-R BT.601 (525) color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec601

RedGreenBlue BT709 D65 Source #

ITU-R BT.709 color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec709

Methods

gamut :: RealFloat e => Gamut BT709 D65 e Source #

transfer :: RealFloat e => e -> e Source #

itransfer :: RealFloat e => e -> e Source #

npm :: (ColorSpace (BT709 'Linear) D65 e, RealFloat e) => NPM BT709 e Source #

inpm :: (ColorSpace (BT709 'Linear) D65 e, RealFloat e) => INPM BT709 e Source #

mkColorRGB :: forall e (l :: Linearity). Color RGB e -> Color (BT709 l) e Source #

unColorRGB :: forall (l :: Linearity) e. Color (BT709 l) e -> Color RGB e Source #

RedGreenBlue AdobeRGB D65 Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

RedGreenBlue SRGB D65 Source #

SRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.SRGB

Methods

gamut :: RealFloat e => Gamut SRGB D65 e Source #

transfer :: RealFloat e => e -> e Source #

itransfer :: RealFloat e => e -> e Source #

npm :: (ColorSpace (SRGB 'Linear) D65 e, RealFloat e) => NPM SRGB e Source #

inpm :: (ColorSpace (SRGB 'Linear) D65 e, RealFloat e) => INPM SRGB e Source #

mkColorRGB :: forall e (l :: Linearity). Color RGB e -> Color (SRGB l) e Source #

unColorRGB :: forall (l :: Linearity) e. Color (SRGB l) e -> Color RGB e Source #

Elevator e => ColorSpace (BT601_625 'Linear) D65 e Source #

ITU-R BT.601 (625) linear color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec601

Elevator e => ColorSpace (BT601_625 'NonLinear) D65 e Source #

ITU-R BT.601 (625) color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec601

Elevator e => ColorSpace (BT601_525 'Linear) D65 e Source #

ITU-R BT.601 (525) linear color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec601

Elevator e => ColorSpace (BT601_525 'NonLinear) D65 e Source #

ITU-R BT.601 (525) linear color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec601

Elevator e => ColorSpace (BT709 'Linear) D65 e Source #

ITU-R BT.709 linear color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec709

Associated Types

type BaseModel (BT709 'Linear) Source #

type BaseSpace (BT709 'Linear) Source #

Elevator e => ColorSpace (BT709 'NonLinear) D65 e Source #

ITU-R BT.709 color space

Instance details

Defined in Graphics.Color.Space.RGB.ITU.Rec709

Associated Types

type BaseModel (BT709 'NonLinear) Source #

type BaseSpace (BT709 'NonLinear) Source #

Elevator e => ColorSpace (AdobeRGB 'Linear) D65 e Source #

AdobeRGB linear color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Associated Types

type BaseModel (AdobeRGB 'Linear) Source #

type BaseSpace (AdobeRGB 'Linear) Source #

Elevator e => ColorSpace (AdobeRGB 'NonLinear) D65 e Source #

AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.AdobeRGB

Elevator e => ColorSpace (SRGB 'Linear) D65 e Source #

SRGB linear color space

Instance details

Defined in Graphics.Color.Space.RGB.SRGB

Associated Types

type BaseModel (SRGB 'Linear) Source #

type BaseSpace (SRGB 'Linear) Source #

Elevator e => ColorSpace (SRGB 'NonLinear) D65 e Source #

SRGB linear color space

Instance details

Defined in Graphics.Color.Space.RGB.SRGB

Associated Types

type BaseModel (SRGB 'NonLinear) Source #

type BaseSpace (SRGB 'NonLinear) Source #

Elevator e => ColorSpace (Y'CbCr BT601_625) D65 e Source # 
Instance details

Defined in Graphics.Color.Space.RGB.Alternative.YCbCr

Elevator e => ColorSpace (Y'CbCr BT601_525) D65 e Source # 
Instance details

Defined in Graphics.Color.Space.RGB.Alternative.YCbCr

Elevator e => ColorSpace (Y'CbCr BT709) D65 e Source # 
Instance details

Defined in Graphics.Color.Space.RGB.Alternative.YCbCr

Associated Types

type BaseModel (Y'CbCr BT709) Source #

type BaseSpace (Y'CbCr BT709) Source #

Elevator e => ColorSpace (Y'CbCr SRGB) D65 e Source # 
Instance details

Defined in Graphics.Color.Space.RGB.Alternative.YCbCr

Associated Types

type BaseModel (Y'CbCr SRGB) Source #

type BaseSpace (Y'CbCr SRGB) Source #

ColorSpace (BT470_625 l) D65 e => ColorSpace (CMYK (BT470_625 l)) D65 e Source #

CMYK representation for BT470_625 color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (BT470_625 l)) Source #

type BaseSpace (CMYK (BT470_625 l)) Source #

ColorSpace (BT470_525 l) D65 e => ColorSpace (CMYK (BT470_525 l)) D65 e Source #

CMYK representation for BT470_525 color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (BT470_525 l)) Source #

type BaseSpace (CMYK (BT470_525 l)) Source #

ColorSpace (BT601_625 l) D65 e => ColorSpace (CMYK (BT601_625 l)) D65 e Source #

CMYK representation for BT601_625 color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (BT601_625 l)) Source #

type BaseSpace (CMYK (BT601_625 l)) Source #

ColorSpace (BT601_525 l) D65 e => ColorSpace (CMYK (BT601_525 l)) D65 e Source #

CMYK representation for BT601_525 color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (BT601_525 l)) Source #

type BaseSpace (CMYK (BT601_525 l)) Source #

ColorSpace (BT709 l) D65 e => ColorSpace (CMYK (BT709 l)) D65 e Source #

CMYK representation for BT709 color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (BT709 l)) Source #

type BaseSpace (CMYK (BT709 l)) Source #

ColorSpace (AdobeRGB l) D65 e => ColorSpace (CMYK (AdobeRGB l)) D65 e Source #

CMYK representation for AdobeRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (AdobeRGB l)) Source #

type BaseSpace (CMYK (AdobeRGB l)) Source #

ColorSpace (SRGB l) D65 e => ColorSpace (CMYK (SRGB l)) D65 e Source #

CMYK representation for SRGB color space

Instance details

Defined in Graphics.Color.Space.RGB.Alternative.CMYK

Associated Types

type BaseModel (CMYK (SRGB l)) Source #

type BaseSpace (CMYK (SRGB l)) Source #

type Temperature D65 Source # 
Instance details

Defined in Graphics.Color.Illuminant.ITU.Rec601

type Temperature D65 = 6504