---
type: Use Case
title: Categorical classes (up to about 12)
description: Unordered categories such as land-cover classes, species, parties or experiment groups.
tags:
  - use-case
  - categorical
sources:
  - id: tol-notes
    resource: https://personal.sron.nl/~pault/
    title: "Paul Tol's Notes: color schemes and templates (SRON)"
  - id: harrower-brewer-2003
    resource: https://colorbrewer2.org/
    title: "Harrower & Brewer (2003), ColorBrewer.org: An online tool for selecting color schemes for maps. The Cartographic Journal 40(1)"
x-colorcurious-slug: categorical-classes
x-colorcurious-colormap-type: categorical
x-colorcurious-synonyms:
  - categories
  - classes
  - qualitative
  - nominal
  - groups
  - labels
  - land cover
  - series colors
  - legend
x-colorcurious-recommended:
  - tol.bright
  - tol.muted
  - tol.vibrant
  - seaborn.colorblind
  - carto.Safe
  - okabeito.okabe_ito
  - petroff.petroff10
x-colorcurious-data: https://colorcurio.us/data/use-cases.json#categorical-classes
---

# Categorical classes (up to about 12)

> Unordered categories such as land-cover classes, species, parties or experiment groups.

Required colormap type: **categorical**. Also known as: categories, classes, qualitative, nominal, groups, labels, land cover, series colors, legend.

## Constraints

A map must be categorical and pass every test below. Fields are paths in [catalog.json](https://colorcurio.us/data/catalog.json) entries.

- `stops_count` ≤ 12 — Beyond about 12 classes colors become hard to tell apart; see the many-classes use case.
- `cvd.protan.min_pairwise_delta_e`, `cvd.deutan.min_pairwise_delta_e`, `cvd.tritan.min_pairwise_delta_e` ≥ 5 — The two closest colors must stay at least ΔE2000 5 apart under each simulated color-vision deficiency, so no pair of classes collapses.

## Recommended

1. [Bright](../colormaps/tol.bright.md) (`tol.bright`): Paul Tol's 7-color qualitative scheme, designed to work for color-blind readers. License: BSD-3-Clause. Stops: [JSON](https://colorcurio.us/data/colormaps/tol.bright.json).
2. [Muted](../colormaps/tol.muted.md) (`tol.muted`): Paul Tol's 10-color qualitative scheme, designed to work for color-blind readers. License: BSD-3-Clause. Stops: [JSON](https://colorcurio.us/data/colormaps/tol.muted.json).
3. [Vibrant](../colormaps/tol.vibrant.md) (`tol.vibrant`): Paul Tol's 7-color scheme, designed to work for color-blind readers. License: BSD-3-Clause. Stops: [JSON](https://colorcurio.us/data/colormaps/tol.vibrant.json).
4. [Colorblind](../colormaps/seaborn.colorblind.md) (`seaborn.colorblind`): seaborn's 10-color palette tagged CVD-friendly. License: BSD-3-Clause. Stops: [JSON](https://colorcurio.us/data/colormaps/seaborn.colorblind.json).
5. [Safe](../colormaps/carto.Safe.md) (`carto.Safe`): CARTOColors qualitative palette tagged colorblind. License: CC-BY-4.0. Stops: [JSON](https://colorcurio.us/data/colormaps/carto.Safe.json).
6. [Okabe-Ito](../colormaps/okabeito.okabe_ito.md) (`okabeito.okabe_ito`): Okabe & Ito's eight colors, designed to stay distinct under the common color-vision deficiencies. License: none stated (published color values). Stops: [JSON](https://colorcurio.us/data/colormaps/okabeito.okabe_ito.json).
7. [Petroff 10](../colormaps/petroff.petroff10.md) (`petroff.petroff10`): Petroff's 10-color cycle, chosen by an aesthetics survey under color-vision-deficiency and lightness constraints (petroff6 and petroff8 are the shorter versions). License: CC0-1.0. Stops: [JSON](https://colorcurio.us/data/colormaps/petroff.petroff10.json).

## Conventions

- Tol's notes recommend these qualitative schemes as distinct for color-blind readers as well as for normal vision.[^tol-notes]

## Notes

Order metrics do not apply to categorical palettes. Use `cvd.*.min_pairwise_delta_e` instead; it is the simulated distance between the two most confusable colors. Using only the first n colors of a palette can only raise it. Popular palettes that fail this test include d3.category10, d3.Tableau10 and colorbrewer.Set1 to Set3; add labels or patterns if you must use them.

## Other maps that pass

5 other categorical maps pass the constraints (not reviewed for this task; maps under Avoid are left out): `petroff.petroff6`, `petroff.petroff8`, `tol.high_contrast`, `tol.light`, `tol.medium_contrast`.

## See also

- [Many categories (more than 12)](categorical-many.md)

## Further reading

- [Harrower & Brewer (2003), ColorBrewer.org: An online tool for selecting color schemes for maps. The Cartographic Journal 40(1)](https://colorbrewer2.org/) doi:10.1179/000870403235002042

[^tol-notes]: Paul Tol's Notes: color schemes and templates (SRON). https://personal.sron.nl/~pault/
