Category Color Generator

L1:
L2:
Grid:

About

2014-08-04

Generate a continuous sequence of distinct random colours for diagrams.

Sampling is done in the Lab color space so that perceptually different colours are generated for the given lightnesses.

Further work: Instead of taking flat slices of lightness, take all samples to be the same distance (in Lab-space) from a given point (i.e. the background color). This should give a more consistent and pleasing amount of contrast.

Update 2015-09-24: advanced version implemented (here).

Bibliography:

  1. bl.ocks.org/mbostock/310c99e53880faec2434
    For introducing the idea of perceptual color
  2. medialab: iwanthue
    Generating fixed-size palettes of optimal colours using the LAB colour space. Spacing done with repulsive forces or kNN clustering.
  3. colorcodehex and Lab color space for the description of the LAB color space.
  4. Low-discrepancy sequence Methods for nice multidimensional sampling