-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Utilities for choosing and creating color schemes.
--   
--   Sets of predefined colors and tools for choosing and creating color
--   schemes. Random colors.
@package palette
@version 0.3.0.1


-- | Types used in Palette modules
module Data.Colour.Palette.Types

-- | A convenient alias.
type Kolor = Colour Double

-- | Used to select the hue range in <tt>randomColor</tt>.
data Hue
HueMonochrome :: Hue
HueRed :: Hue
HueOrange :: Hue
HueYellow :: Hue
HueGreen :: Hue
HueBlue :: Hue
HuePurple :: Hue
HuePink :: Hue
HueRandom :: Hue

-- | Used to select the luminosity range in <tt>randomColor</tt>.
data Luminosity
LumBright :: Luminosity
LumLight :: Luminosity
LumDark :: Luminosity
LumRandom :: Luminosity
data ColorDefinition
ColorDefinition :: Maybe (Int, Int) -> [(Int, Int)] -> ColorDefinition
[hueRange] :: ColorDefinition -> Maybe (Int, Int)
[lowerBounds] :: ColorDefinition -> [(Int, Int)]
instance GHC.Classes.Eq Data.Colour.Palette.Types.Luminosity
instance GHC.Show.Show Data.Colour.Palette.Types.Luminosity
instance GHC.Classes.Eq Data.Colour.Palette.Types.Hue
instance GHC.Show.Show Data.Colour.Palette.Types.Hue


-- | Utility functions to creating color schemes.
module Data.Colour.Palette.Harmony

-- | A convenient alias.
type Kolor = Colour Double

-- | Tints a color by adding blending t * white + (1 - t) color. t should
--   be between 0 and 1.
tint :: Double -> Kolor -> Kolor

-- | Alter the tone of a color by adding blending t * gray + (1 - t) color.
--   t should be between 0 and 1.
tone :: Double -> Kolor -> Kolor

-- | Shades a color by adding blending s * black + (1 - t) color. t should
--   be between 0 and 1.
shade :: Double -> Kolor -> Kolor

-- | Rotate a color and apply one function to its saturation and another to
--   its value.
sliders :: Kolor -> Double -> (Double -> Double) -> (Double -> Double) -> Kolor

-- | Rotate a color on the RYB color wheel
rotateColor :: Double -> Kolor -> Kolor

-- | Create a monochromatic set of 5 colors based in the input color.
monochrome :: Kolor -> [Kolor]

-- | A color harmony using the base color and its opposite.
complement :: Kolor -> [Kolor]

-- | A color chord based on three equally spaced hues.
triad :: Kolor -> [Kolor]

-- | Scheme based on 4 colors on a rectangle incscribed in the RYB color
--   wheel.
tetrad :: Kolor -> [Kolor]

-- | Chord base on three adjacent colors on the artists color wheel.
analogic :: Kolor -> [Kolor]

-- | Analogic chord plus the color opposite to the base color.
accentAnalogic :: Kolor -> [Kolor]

-- | Black, white and gray with a touch of the base color added.
bwg :: Kolor -> [Kolor]

-- | Interpolate n colors from a list of colors using linear piecewise
--   interpolation to add additional colors to a palette.
colorRamp :: Int -> [Kolor] -> [Kolor]


-- | Functions to create random colors. Includes a port of <a>David
--   Merfield's</a> randomColor.
module Data.Colour.Palette.RandomColor

-- | Generate a random color from CIELAB (a perceptually uniform color
--   space) with a White point of <a>d65</a>. Probably the best choice if
--   you want a totally random color.
--   
--   
--   <pre>
--   randomCIELab
--   </pre>
randomCIELab :: MonadRandom m => m Kolor

-- | Generate a random color palette using <a>randomCIELab</a>. First
--   choose a random color then choose a random harmony and apply it.
--   
--   
--   <pre>
--   randomCIELabPalette
--   </pre>
randomCIELabPalette :: MonadRandom m => m [Kolor]

-- | Generate a random opaque color.
--   
--   
--   <pre>
--   randomColor HueRed LumBright
--   </pre>
--   
--   
--   <pre>
--   randomColor HueOrange LumBright
--   </pre>
--   
--   
--   <pre>
--   randomColor HueYellow LumBright
--   </pre>
--   
--   
--   <pre>
--   randomColor HueGreen LumBright
--   </pre>
--   
--   
--   <pre>
--   randomColor HueBlue LumBright
--   </pre>
--   
--   
--   <pre>
--   randomColor HuePurple LumBright
--   </pre>
--   
--   
--   <pre>
--   randomColor HuePink LumBright
--   </pre>
--   
--   
--   <pre>
--   randomColor HueMonochrome LumRandom
--   </pre>
--   
--   
--   <pre>
--   randomColor HueRandom LumLight
--   </pre>
--   
--   
--   <pre>
--   randomColor HueRandom LumDark
--   </pre>
--   
--   
--   <pre>
--   randomColor HueRandom LumRandom
--   </pre>
--   
--   <i>Better to use <a>randomCIELab</a> for truly random colors</i>.
randomColor :: MonadRandom m => Hue -> Luminosity -> m Kolor

-- | Generate a random color palette. First choose a random color then
--   choose a random harmony and apply it.
--   
--   
--   <pre>
--   randomPalette
--   </pre>
randomPalette :: MonadRandom m => Hue -> Luminosity -> m [Kolor]

-- | Return a random harmony based on a seed color.
randomHarmony :: MonadRandom m => Kolor -> m [Kolor]

-- | Return a random hue in the range $[lo, hi]$ as a <a>Double</a>. lo
--   should be &gt;= 0 and hi &lt; 360. Instead of storing red as two
--   seperate ranges we create a single contiguous range using negative
--   numbers.
randomHue :: MonadRandom m => Hue -> m Int
randomSaturation :: MonadRandom m => Hue -> Luminosity -> m Int

-- | Pick a random brightness value given a <a>Hue</a>, <a>Luminosity</a>
--   and saturation.
randomBrightness :: MonadRandom m => Hue -> Luminosity -> Int -> m Int


-- | Predefined sets of colors. Including the common html/css colors, The
--   colors from d3.js and the standard color wheel. d3 Colors from
--   https://github.com/mbostock/d3/wiki/Ordinal-Scales.
module Data.Colour.Palette.ColorSet

-- | A convenient alias.
type Kolor = Colour Double

-- | The 24 colors from the artist's RYB color wheel. 0 == red.
rybColor :: Int -> Kolor

-- | Four levels of brightness for functions that take a
--   <tt>Brightness</tt> parameter. For functions with only two levels of
--   <tt>Brightness</tt> we set <tt>darkest == dark</tt> and <tt>lightest
--   == light</tt>.
data Brightness
Darkest :: Brightness
Dark :: Brightness
Light :: Brightness
Lightest :: Brightness

-- | Choose from one of 10 contrasting colors (0-9) borrowed from
--   mbostock's d3.
--   
d3Colors1 :: Int -> Kolor

-- | Choose 0 for dark and 1 for light for each pair of 10 sets of
--   contrasting colors (0-9) from d3.
--   
d3Colors2 :: Brightness -> Int -> Kolor

-- | Choose from 4 levels of darkness - 0 for darkest, 3 - for lightest.
--   From 10 quadruples of contrasting colors (0-9) from d3.
--   
d3Colors4 :: Brightness -> Int -> Kolor

-- | Return a color from webColorL arranged as to provide nice contrast
--   between near by colors.
--   
webColors :: Int -> Kolor

-- | A List of webColors ordered as above, cycling infinitely many times.
infiniteWebColors :: [Kolor]

-- | Choose the <tt>n</tt>th color in an array <tt>a</tt> skipping
--   <tt>skip</tt> colors every time.
getWebColor :: Array Int (Kolor) -> Int -> Int -> Kolor
instance GHC.Classes.Eq Data.Colour.Palette.ColorSet.Brightness


-- | Sets of between 3 and 12 colors. This product includes color
--   specifications and designs developed by <a>Cynthia Brewer</a>.
module Data.Colour.Palette.BrewerSet

-- | Obtain a list of colors for the color scheme designated by category
--   and number <tt>n</tt> of colors in the theme. If the category and/or
--   number does not exist then returns a list <a>black</a> repeated
--   <tt>n</tt> times.
brewerSet :: ColorCat -> Int -> [Kolor]

-- | A convenient alias.
type Kolor = Colour Double

-- | Categories of color sets. Each category has several lists of colors.
--   Each one containing the number of colors in the range specfied.
data ColorCat

-- | 3 - 9, sequential multihue
YlGn :: ColorCat

-- | 3 - 9, sequential multihue
YlGnBu :: ColorCat

-- | 3 - 9, sequential multihue
GnBu :: ColorCat

-- | 3 - 9, sequential multihue
BuGn :: ColorCat

-- | 3 - 9, sequential multihue
PuBuGn :: ColorCat

-- | 3 - 9, sequential multihue
PuBu :: ColorCat

-- | 3 - 9, sequential multihue
BuPu :: ColorCat

-- | 3 - 9, sequential multihue
RdPu :: ColorCat

-- | 3 - 9, sequential multihue
PuRd :: ColorCat

-- | 3 - 9, sequential multihue
OrRd :: ColorCat

-- | 3 - 9, sequential multihue
YlOrRd :: ColorCat

-- | 3 - 9, sequential multihue
YlOrBr :: ColorCat

-- | 3 - 9, sequential single hue
Purples :: ColorCat

-- | 3 - 9, sequential single hue
Blues :: ColorCat

-- | 3 - 9, sequential single hue
Greens :: ColorCat

-- | 3 - 9, sequential single hue
Oranges :: ColorCat

-- | 3 - 9, sequential single hue
Reds :: ColorCat

-- | 3 - 9, sequential single hue
Greys :: ColorCat

-- | 3 - 11, diverging
PuOr :: ColorCat

-- | 3 - 11, diverging
BrBG :: ColorCat

-- | 3 - 11, diverging
PRGn :: ColorCat

-- | 3 - 11, diverging
PiYG :: ColorCat

-- | 3 - 11, diverging
RdBu :: ColorCat

-- | 3 - 11, diverging
RdGy :: ColorCat

-- | 3 - 11, diverging
RdYlBu :: ColorCat

-- | 3 - 11, diverging
Spectral :: ColorCat

-- | 3 - 11, diverging
RdYlGn :: ColorCat

-- | 3 - 8, qualitative
Accent :: ColorCat

-- | 3 - 8, qualitative
Dark2 :: ColorCat

-- | 3 - 12, qualitative
Paired :: ColorCat

-- | 3 - 9, qualitative
Pastel1 :: ColorCat

-- | 3 - 8, qualitative
Pastel2 :: ColorCat

-- | 3 - 9, qualitative
Set1 :: ColorCat

-- | 3 - 8, qualitative
Set2 :: ColorCat

-- | 3 - 12, qualitative
Set3 :: ColorCat
instance GHC.Classes.Ord Data.Colour.Palette.BrewerSet.ColorSet
instance GHC.Classes.Eq Data.Colour.Palette.BrewerSet.ColorSet
instance GHC.Classes.Ord Data.Colour.Palette.BrewerSet.ColorCat
instance GHC.Classes.Eq Data.Colour.Palette.BrewerSet.ColorCat
