Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A haskell library for dealing with colors.
Haskell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/Data/Prizm
tests
.gitignore
.travis.yml
CHANGES
DEBT
LICENSE
README.org
Setup.hs
blending-test.html
prizm.cabal

README.org

Welcome!

https://img.shields.io/hackage/v/prizm.svg?style=flat https://travis-ci.org/ixmatus/prizm.svg?branch=master

`prizm` is a Haskell library for computing with colors. Specifically providing functions for transforming between different color spaces, interpolating colors and adjusting the tint, shade, hue, or lightness or a color.

My inspiration for writing this was Sass and Bourbon, both implement interesting functions for computing with colors for use in stylesheets and I wanted the same thing for use in Clay.

Colour Module

There is some overlap with the Haskell Colour Module that already exists; however, this library is filling a couple of needs the other doesn’t satisfy. Primarily transformations and color mutations in the CIE L*Ch space.

Supported Algorithms

  • sRGB <-> CIE XYZ
  • CIE XYZ <-> CIE L\*ab
  • CIE L\*ab <-> CIE L\*Ch

Supported Functions

  • Color interpolation
  • Tinting / Darkening
  • Lightness
  • Hue
  • Chroma/Saturation

All of these functions operate on color within the CIE L\*Ch representation. The percentage values may range between -100 and 100.

General Color Formulas, Data, and Algorithms CIE Conversion Mathematics Conversion Algorithm Sources Good list of useful color manipulation formulas

Something went wrong with that request. Please try again.