[Paper Review] colorspace: A Toolbox for Manipulating and Assessing Colors and Palettes
The colorspace R package provides a flexible toolkit to select, manipulate, and evaluate colors and color palettes using the HCL color space, including qualitative, sequential, and diverging types, with visualization, interactive apps, and color-vision deficiency emulation.
The R package colorspace provides a flexible toolbox for selecting individual colors or color palettes, manipulating these colors, and employing them in statistical graphics and data visualizations. In particular, the package provides a broad range of color palettes based on the HCL (Hue-Chroma-Luminance) color space. The three HCL dimensions have been shown to match those of the human visual system very well, thus facilitating intuitive selection of color palettes through trajectories in this space. Using the HCL color model general strategies for three types of palettes are implemented: (1) Qualitative for coding categorical information, i.e., where no particular ordering of categories is available. (2) Sequential for coding ordered/numeric information, i.e., going from high to low (or vice versa). (3) Diverging for coding ordered/numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes. To aid selection and application of these palettes the package also contains scales for use with ggplot2, shiny (and tcltk) apps for interactive exploration, visualizations of palette properties, accompanying manipulation utilities (like desaturation and lighten/darken), and emulation of color vision deficiencies.
Motivation & Objective
- Provide an accessible, perceptually-mounded framework for palette construction based on the HCL color space.
- Offer a broad set of predefined qualitative, sequential, and diverging palettes with customizable parameters.
- Enable palette visualization, assessment, and manipulation (desaturation, lightening/darkening, etc.).
- Facilitate integration with graphics systems such as ggplot2 and interactive apps (Shiny, tcltk).
- Support color-vision deficiency emulation to evaluate accessibility of color palettes.
Proposed method
- Adopts the perceptually-based Hue–Chroma–Luminance (HCL) color space to construct three palette types: qualitative, sequential, and diverging.
- Provides S4 color space classes and utilities for converting between spaces, extracting coordinates, and hex encoding.
- Implements palette construction via hcl_palettes and specific functions qualitative_hcl(), sequential_hcl(), and diverging_hcl(), with both fixed and parametric trajectories for H, C, and L.
- Includes methods to customize palettes through hue, chroma, and luminance trajectories, plus power-transformed trajectories and multi-hue variants.
- Offers visualization tools (demoplot, hclplot, specplot) to assess luminance, chroma, and hue distributions within palettes.
- Provides ggplot2 scale integrations (scale_<aesthetic>_<datatype>_<colorscale>()) and interactive tools (choose_palette/hclwizard) for exploration.

Experimental results
Research questions
- RQ1How can colorspace generate perceptually coherent color palettes using the HCL color space?
- RQ2What are the constructions and parameterizations (trajectories) that define qualitative, sequential, and diverging palettes in colorspace?
- RQ3How can users visualize and assess the properties of HCL-based palettes (hue, chroma, luminance) and their suitability for different plot types?
- RQ4How does colorspace support interoperability with base R graphics and ggplot2, including color scales and app-based exploration?
- RQ5What features are available for emulating color vision deficiencies to evaluate accessibility of palettes?
Key findings
- Colorspace provides three main palette constructors based on HCL: qualitative_hcl(), sequential_hcl(), and diverging_hcl().
- The package ships with a broad collection of predefined palettes across qualitative, sequential (single- and multi-hue), and diverging types that approximate popular Palette families.
- Palette visualization utilities (demoplot, hclplot, specplot) enable assessment of hue, chroma, and luminance trajectories within palettes.
- Integration with ggplot2 scales and interactive apps (hclwizard, Shiny, tcltk) facilitates easy palette application and exploration.
- The package supports palette customization and registration of user-defined palettes via a register argument, enabling extension of the palette catalog.

Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.