# colorspace

> A toolbox for manipulating and assessing colours and palettes in R

Source: https://talira.ai/catalog/colorspace-ytt96ntt
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / color](https://talira.ai/categories/libraries/color), [languages / r](https://talira.ai/categories/languages/r)
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Achim Zeileis](https://talira.ai/orgs/achim-zeileis.md)

colorspace is an R package for working with colours: it converts between colour spaces (RGB, HSV, HLS, CIEXYZ, CIELUV, HCL, CIELAB and polar CIELAB) and provides qualitative, sequential and diverging palettes built in HCL space, with matching ggplot2 colour scales. Interactive apps (Tcl/Tk or Shiny) help choose a palette, and Shiny apps offer an HCL colour picker and a colour vision deficiency emulator. Plotting functions show palettes as swatches, in HCL space and as HCL or RGB trajectories, and manipulation functions desaturate, lighten, darken and mix colours and simulate deuteranomaly, protanomaly and tritanomaly. It's described in Zeileis et al. (2020) in the Journal of Statistical Software.

## Links

- Website: https://zeileis.codeberg.page/colorspace/
- Codeberg: https://codeberg.org/zeileis/colorspace
- Docs: https://zeileis.codeberg.page/colorspace/

## Problems it solves

- choose a colour palette for my R plots that colour-blind readers can tell apart
- check how my chart's colours look to someone with colour vision deficiency
- convert colours between RGB, HCL and CIELAB in R

## Features

- conversion between RGB, HSV, HLS, CIEXYZ, CIELUV, HCL and CIELAB
- qualitative, sequential and diverging HCL palettes with ggplot2 scales
- interactive palette chooser, HCL colour picker and colour vision deficiency emulator
- desaturate, lighten, darken and mix colours
- simulate colour vision deficiencies

## Trust

Overall: 0.27 out of 1.
Signals: backing 0.30, extensibility 0.00.

- backed by Achim Zeileis

Warnings:

- activity not tracked: Talira doesn't read Codeberg repositories yet

## Alternatives

- [viridisLite](https://talira.ai/catalog/viridislite-w6ry1y99.md): Colour-blind-friendly, perceptually uniform colour maps for base R

## Sources

[^1]: https://cran.r-project.org/web/packages/colorspace/index.html (checked 28 Nov 2026)
