Code Snippets

R colorspace package

Package and source code available on cran:

The R colorspace package

The R colorspace package provides a set of pre-defined color palettes based on the Hue-Chroma-Luminance color space. The HCL color space, in contrast to the famous Red-Green-Blue color space, is based on the human color perception and allows to directly control the three major dimensions of how we perceive colors.

The R package provides a set of useful and handy tools and interactive interfaces to create, customize, and use effective color maps drawn from the HCL color space. Furthermore, a set of methods is included to simulate color vision deficiencies such as deuteranomaly (the “red-green” blindness), protanomaly (less common “blue-yellow” blindness) and the relatively rare tritanomaly to check if the color palette also work for our colleges with specific color constraints.

The python implementation

Please note that I have been working on a python in Summer 2018. You can find some more information about the python colorspace on this page.

The website provides detailed information about the HCL color space and the colorspace package.

Furthermore, the website provides an interactive interface to the colorspace package which allows everyone out there to make use of the colorspace package, even if you are no R user.