Skip to content
Convert, manipulate, analyze, blend, color scales, color schemes
PureScript
Branch: master
Clone or download
Latest commit fb582d3 May 26, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documentation Update docu Sep 7, 2017
src fix index usage May 20, 2018
test changes for 0.12 May 14, 2018
.gitignore Move example -> documentation Aug 2, 2017
.travis.yml Added .travis.yml Aug 2, 2017
README.md Move example -> documentation Aug 2, 2017
bower.json update packages May 27, 2018
package.json

README.md

purescript-colors

Latest release Build Status

A package for dealing with colors in PureScript.

Examples

> toHexString (hsl 200.0 0.4 0.5)
"#4d91b3"

> cssStringHSLA (seagreen # lighten 0.2 # saturate 0.3)
"hsl(146.45, 80.27%, 56.27%)"

> toHexString <$> colors (colorScale HSL hotpink Nil darksalmon) 5
"#ff69b4" : "#fa6d99" : "#f47182" : "#ef7d76" : "#e9967a" : Nil

> toHexString <$> (sortBy (comparing luminance) [black, white, blue, lightgreen])
["#000000","#0000ff","#90ee90","#ffffff"]

Credit

Based on initial work by paf31 and inspired by (the PureScript version of) Elm.Color, TinyColor and Chroma.js.

Development

To run the unit tests, the following steps are necessary:

bower install
pulp test

To build the interactive docmentation, run:

cd documentation
bower install
pulp build -O -m Main -t html/test.js
You can’t perform that action at this time.