okabe-ito

Okabe-Ito colour-vision-deficiency-safe qualitative palette.

Eight-colour array (Wong 2011, Nature Methods) used as the library default for unmapped discrete colour and fill aesthetics. Order matches ggthemes::scale_colour_colorblind: orange, sky blue, bluish green, yellow, blue, vermilion, reddish purple, grey. Black is omitted to avoid clashing with axes and text on a white background.

Usage

okabe-ito

Examples

Pass the palette to a manual scale to opt into Okabe-Ito on a per-aesthetic basis (the same colours are also the library default).

#let d = (
  (x: 1, y: 2, sp: "a"),
  (x: 2, y: 4, sp: "b"),
  (x: 3, y: 3, sp: "c"),
)
#plot(
  data: d,
  mapping: aes(x: "x", y: "y", colour: "sp"),
  layers: (geom-point(size: 3pt),),
  scales: (scale-colour-manual(values: okabe-ito),),
  width: 10cm,
  height: 6cm,
)

Scatter chart of three points coloured by category using the Okabe-Ito CVD-safe qualitative palette.

Scatter chart of three points coloured by category using the Okabe-Ito CVD-safe qualitative palette.

See also

scale-colour-okabe-ito, scale-fill-okabe-ito, brewer-palette.

Back to top