palette-0.3.0.2: Utilities for choosing and creating color schemes.

Copyright(c) 2018 Jeffrey Rosenbluth
LicenseBSD-style (see LICENSE)
Maintainerjeffrey.rosenbluth@gmail.com
Safe HaskellSafe
LanguageHaskell2010

Data.Colour.Palette.RandomColor

Contents

Description

Functions to create random colors. Includes a port of David Merfield's randomColor.

Synopsis

A Library for generating random colors.

Choose a random color from CIELAB colorspace.

randomCIELab :: MonadRandom m => m Kolor #

Generate a random color from CIELAB (a perceptually uniform color space) with a White point of d65. Probably the best choice if you want a totally random color.

randomCIELab

randomCIELabPalette :: MonadRandom m => m [Kolor] #

Generate a random color palette using randomCIELab. First choose a random color then choose a random harmony and apply it.

randomCIELabPalette

Choose a random color using David Merfield's algorithm

randomColor :: MonadRandom m => Hue -> Luminosity -> m Kolor #

Generate a random opaque color.

randomColor HueRed LumBright

randomColor HueOrange LumBright

randomColor HueYellow LumBright

randomColor HueGreen LumBright

randomColor HueBlue LumBright

randomColor HuePurple LumBright

randomColor HuePink LumBright

randomColor HueMonochrome LumRandom

randomColor HueRandom LumLight

randomColor HueRandom LumDark

randomColor HueRandom LumRandom

Better to use randomCIELab for truly random colors.

randomPalette :: MonadRandom m => Hue -> Luminosity -> m [Kolor] #

Generate a random color palette. First choose a random color then choose a random harmony and apply it.

randomPalette

randomHarmony :: MonadRandom m => Kolor -> m [Kolor] #

Return a random harmony based on a seed color.

Choose a random HSV component

randomHue :: MonadRandom m => Hue -> m Int #

Return a random hue in the range $[lo, hi]$ as a Double. lo should be >= 0 and hi < 360. Instead of storing red as two seperate ranges we create a single contiguous range using negative numbers.

randomBrightness :: MonadRandom m => Hue -> Luminosity -> Int -> m Int #

Pick a random brightness value given a Hue, Luminosity and saturation.