Copyright | (c) Alexey Kuleshevich 2018-2019 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- convert :: (ColorSpace cs' i' e', ColorSpace cs i e) => Color cs' e' -> Color cs e
- data VonKries
- newtype CAT (t :: k) e = CAT (M3x3 e)
- newtype ICAT (t :: k) e = ICAT (M3x3 e)
- class ChromaticAdaptationTransform (t :: VonKries)
- cat :: (ChromaticAdaptationTransform t, RealFloat e) => CAT t e
- icat :: forall t e. (ChromaticAdaptationTransform t, RealFloat e) => ICAT t e
- vonKriesAdaptation :: ChromaticAdaptation VonKries it ir e => Adaptation VonKries it ir e
- bradfordAdaptation :: ChromaticAdaptation Bradford it ir e => Adaptation Bradford it ir e
- fairchildAdaptation :: ChromaticAdaptation Fairchild it ir e => Adaptation Fairchild it ir e
- ciecam02Adaptation :: ChromaticAdaptation CIECAM02 it ir e => Adaptation CIECAM02 it ir e
- adaptationMatrix :: forall t it ir e. (ChromaticAdaptationTransform t, ChromaticAdaptation t it ir e) => Adaptation (t :: VonKries) it ir e
Color conversion
convert :: (ColorSpace cs' i' e', ColorSpace cs i e) => Color cs' e' -> Color cs e Source #
This function allows conversion of a color between any two color spaces. It uses a
very common VonKries
chromatic adaptation transform with Bradford
matrix. One of
more general functions convertWith
or
convertElevatedWith
can be used for selecting another
chromatic adaptation algorithm.
Since: 0.1.0
Von Kries adaptation
VonKries | VonKries chromatic adaptation transform matrix
|
Bradford | Bradford chromatic adaptation transform matrix
|
Fairchild | Fairchild chromatic adaptation transform matrix
|
CIECAM02 | CIECAM02 chromatic adaptation transform matrix
|
Instances
(Illuminant it, Illuminant ir, Elevator e, RealFloat e) => ChromaticAdaptation (t :: VonKries) (it :: kt) (ir :: kr) e Source # | |
Defined in Graphics.Color.Adaptation.VonKries data Adaptation t it ir e :: Type Source # adaptColorXYZ :: Adaptation t it ir e -> Color (XYZ it) e -> Color (XYZ ir) e Source # | |
Eq e => Eq (Adaptation t it ir e) Source # | |
Defined in Graphics.Color.Adaptation.VonKries (==) :: Adaptation t it ir e -> Adaptation t it ir e -> Bool # (/=) :: Adaptation t it ir e -> Adaptation t it ir e -> Bool # | |
(Illuminant it, Illuminant ir, Elevator e) => Show (Adaptation t it ir e) Source # | |
Defined in Graphics.Color.Adaptation.VonKries showsPrec :: Int -> Adaptation t it ir e -> ShowS # show :: Adaptation t it ir e -> String # showList :: [Adaptation t it ir e] -> ShowS # | |
newtype Adaptation (t :: VonKries) (it :: kt) (ir :: kr) e Source # | |
Defined in Graphics.Color.Adaptation.VonKries |
newtype CAT (t :: k) e Source #
Chromatic adaptation transformation matrix matrix
newtype ICAT (t :: k) e Source #
Inverse of chromatic adaptation transformation matrix
class ChromaticAdaptationTransform (t :: VonKries) Source #
vonKriesAdaptation :: ChromaticAdaptation VonKries it ir e => Adaptation VonKries it ir e Source #
bradfordAdaptation :: ChromaticAdaptation Bradford it ir e => Adaptation Bradford it ir e Source #
fairchildAdaptation :: ChromaticAdaptation Fairchild it ir e => Adaptation Fairchild it ir e Source #
ciecam02Adaptation :: ChromaticAdaptation CIECAM02 it ir e => Adaptation CIECAM02 it ir e Source #
adaptationMatrix :: forall t it ir e. (ChromaticAdaptationTransform t, ChromaticAdaptation t it ir e) => Adaptation (t :: VonKries) it ir e Source #