prizm-2.0.1: 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.Types

Contents

Description

 

Synopsis

Generic Utility Types

newtype RGBtoXYZ Source #

Working space matrix to convert from sRGB to CIE XYZ.

Constructors

RGBtoXYZ [[Double]] 

newtype XYZtoRGB Source #

Working space matrix to convert from CIE XYZ to sRGB.

Constructors

XYZtoRGB [[Double]] 

type Hex = String Source #

Hexadecimal encoded color code with an octothorpe prefix; e.g: #AB9D92.

type Percent = Integer Source #

A percent value ranging from -100 to 100; e.g: -82%, 80%, 10%.

CIE Color Space Types

data XYZ Source #

A color in the CIE XYZ color space.

Constructors

XYZ !Double !Double !Double 

Instances

Eq XYZ Source # 

Methods

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

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

Ord XYZ Source # 

Methods

compare :: XYZ -> XYZ -> Ordering #

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

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

(>) :: XYZ -> XYZ -> Bool #

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

max :: XYZ -> XYZ -> XYZ #

min :: XYZ -> XYZ -> XYZ #

Show XYZ Source # 

Methods

showsPrec :: Int -> XYZ -> ShowS #

show :: XYZ -> String #

showList :: [XYZ] -> ShowS #

MonoFunctor XYZ Source # 

Methods

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

type Element XYZ Source # 

data LAB Source #

A color in the CIE L*a*b* color space.

Constructors

LAB !Double !Double !Double 

Instances

Eq LAB Source # 

Methods

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

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

Ord LAB Source # 

Methods

compare :: LAB -> LAB -> Ordering #

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

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

(>) :: LAB -> LAB -> Bool #

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

max :: LAB -> LAB -> LAB #

min :: LAB -> LAB -> LAB #

Show LAB Source # 

Methods

showsPrec :: Int -> LAB -> ShowS #

show :: LAB -> String #

showList :: [LAB] -> ShowS #

MonoFunctor LAB Source # 

Methods

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

type Element LAB Source # 

data LCH Source #

A color in the CIE L*C*h(uv) color space.

Constructors

LCH !Double !Double !Double 

Instances

Eq LCH Source # 

Methods

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

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

Ord LCH Source # 

Methods

compare :: LCH -> LCH -> Ordering #

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

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

(>) :: LCH -> LCH -> Bool #

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

max :: LCH -> LCH -> LCH #

min :: LCH -> LCH -> LCH #

Show LCH Source # 

Methods

showsPrec :: Int -> LCH -> ShowS #

show :: LCH -> String #

showList :: [LCH] -> ShowS #

MonoFunctor LCH Source # 

Methods

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

AdjustableColor LCH Source # 
BlendableColor LCH Source # 
PresetColor LCH Source # 
type Element LCH Source # 

RGB Color Space Types

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 #

PresetColor RGB Source # 
type Element RGB Source #