prizm: A haskell library for computing with colors

[ bsd3, graphics, library ] [ Propose Tags ]

Prizm can convert between many different color representations; notably the sRGB and CIE representations. Future versions will have implementations for mutating colors as well.

[Skip to Readme]


  • Data
    • Prizm
      • Data.Prizm.Color
        • Data.Prizm.Color.CIE
        • Matrices
          • Data.Prizm.Color.Matrices.RGB
          • Data.Prizm.Color.Matrices.XYZ
        • Data.Prizm.Color.SRGB
        • Data.Prizm.Color.Transform
      • Data.Prizm.Types


Maintainer's Corner

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,,,,,, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 2.0.0, 2.0.1, 3.0.0 (info)
Change log CHANGES
Dependencies base (>=4.5 && <5), text (>= [details]
License BSD-3-Clause
Copyright (c) 2013 Parnell Springmeyer
Author Parnell Springmeyer
Category Graphics
Home page
Bug tracker
Source repo head: git clone
Uploaded by ParnellSpringmeyer at 2013-06-02T20:02:11Z
Distributions NixOS:3.0.0
Downloads 10583 total (87 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-21 [all 7 reports]

Readme for prizm-

[back to package description]


Prizm is a haskell library for dealing with colors. Please contribute!

My inspiration for writing this was Sass and Bourbon, both implement interesting color handling functions for use in stylesheets and I wanted the same thing for use in Clay (also for Bentonite).

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.


This module is getting kind of messy, I want to refactor how everything is organized. I also need to fix the types.

Supported Algorithms

  • sRGB <-> CIE XYZ
  • CIE XYZ <-> CIE L*a*b*
  • CIE L*\a*b <-> CIE L*C*h


I really want to clean up the API - right now stuff is just "everywhere" and the different color spaces should have their own modules with their own convenience conversions to/from RGB to minimize the amount of function chaining required.

I also want to figure out a way of testing the lighten/darken, interpolation, and hue transformation functions.

Blending is now switched over to using CIE L*Ch color space for more accurate blending.

Functions for

  • color blending
  • tint / shade
  • darken / lighten

Conversion functions for sRGB to HEX.

All color types should have instances for Functor so fmap can work over their values. All color types should have instances for Applicative to make computations cleaner.

Make sure all of the conversion formulas convert losslessly at an acceptable level of precision.

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