palette- Utilities for choosing and creating color schemes.

Copyright(c) 2013 Jeffrey Rosenbluth
LicenseBSD-style (see LICENSE)
Safe HaskellSafe




Predefined sets of colors. Including the common html/css colors, The colors from d3.js and the standard color wheel. d3 Colors from


Predefined color palettes

Synonym for Colour Double

type Kolor = Colour Double Source #

A convenient alias.

RYB color wheel - red, rellow, blue

Artist's pigment color wheel

rybColor :: Int -> Kolor Source #

The 24 colors from the artist's RYB color wheel. 0 == red.

Colors from d3.js

data Brightness Source #

Four levels of brightness for functions that take a Brightness parameter. For functions with only two levels of Brightness we set darkest == dark and lightest == light.


Eq Brightness Source # 
Instance details

Defined in Data.Colour.Palette.ColorSet

d3Colors1 :: Int -> Kolor Source #

Choose from one of 10 contrasting colors (0-9) borrowed from mbostock's d3.

d3Colors2 :: Brightness -> Int -> Kolor Source #

Choose 0 for dark and 1 for light for each pair of 10 sets of contrasting colors (0-9) from d3.

d3Colors4 :: Brightness -> Int -> Kolor Source #

Choose from 4 levels of darkness - 0 for darkest, 3 - for lightest. From 10 quadruples of contrasting colors (0-9) from d3.

Common html colors

webColors :: Int -> Kolor Source #

Return a color from webColorL arranged as to provide nice contrast between near by colors.

infiniteWebColors :: [Kolor] Source #

A List of webColors ordered as above, cycling infinitely many times.

getWebColor :: Array Int Kolor -> Int -> Int -> Kolor Source #

Choose the nth color in an array a skipping skip colors every time.