prizm-3.0.0: Convert colors to different color spaces, interpolate colors, and transform colors

Copyright(C) 2013 Parnell Springmeyer
LicenseBSD3
MaintainerParnell Springmeyer <parnell@digitalmentat.com>
Stabilitystable
Safe HaskellSafe
LanguageHaskell2010

Data.Prizm.Types

Description

 

Synopsis

Documentation

newtype HexRGB Source #

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

Please see decodeHex.

Constructors

HexRGB 

Fields

type Percent = Integer Source #

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

newtype ColorCoord a Source #

A generic representation of a color triple; this may be *any* color space so you should not construct colors with ColorCoord and instead you should use specialized color constructors from the RGB module or CIE module.

Constructors

ColorCoord (a, a, a) 

Instances

Monad ColorCoord Source # 

Methods

(>>=) :: ColorCoord a -> (a -> ColorCoord b) -> ColorCoord b #

(>>) :: ColorCoord a -> ColorCoord b -> ColorCoord b #

return :: a -> ColorCoord a #

fail :: String -> ColorCoord a #

Functor ColorCoord Source # 

Methods

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

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

Applicative ColorCoord Source # 

Methods

pure :: a -> ColorCoord a #

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

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

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

Foldable ColorCoord Source # 

Methods

fold :: Monoid m => ColorCoord m -> m #

foldMap :: Monoid m => (a -> m) -> ColorCoord a -> m #

foldr :: (a -> b -> b) -> b -> ColorCoord a -> b #

foldr' :: (a -> b -> b) -> b -> ColorCoord a -> b #

foldl :: (b -> a -> b) -> b -> ColorCoord a -> b #

foldl' :: (b -> a -> b) -> b -> ColorCoord a -> b #

foldr1 :: (a -> a -> a) -> ColorCoord a -> a #

foldl1 :: (a -> a -> a) -> ColorCoord a -> a #

toList :: ColorCoord a -> [a] #

null :: ColorCoord a -> Bool #

length :: ColorCoord a -> Int #

elem :: Eq a => a -> ColorCoord a -> Bool #

maximum :: Ord a => ColorCoord a -> a #

minimum :: Ord a => ColorCoord a -> a #

sum :: Num a => ColorCoord a -> a #

product :: Num a => ColorCoord a -> a #

Traversable ColorCoord Source # 

Methods

traverse :: Applicative f => (a -> f b) -> ColorCoord a -> f (ColorCoord b) #

sequenceA :: Applicative f => ColorCoord (f a) -> f (ColorCoord a) #

mapM :: Monad m => (a -> m b) -> ColorCoord a -> m (ColorCoord b) #

sequence :: Monad m => ColorCoord (m a) -> m (ColorCoord a) #

Eq a => Eq (ColorCoord a) Source # 

Methods

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

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

Ord a => Ord (ColorCoord a) Source # 
Read a => Read (ColorCoord a) Source # 
Show a => Show (ColorCoord a) Source # 

(<$$$>) :: (a -> b) -> (a, a, a) -> (b, b, b) Source #

Map a function over each element of a triple..

(<***>) :: (a -> b, a -> b, a -> b) -> (a, a, a) -> (b, b, b) Source #

Sequentially apply a triple to another triple, like Applicative's sequential application but specialized to triples.