Common color mistakes and how to avoid them
For use cases where one <i>truly needs</i> to put aesthetics and accessibility aside, and instead squeeze the gamut of possible colours to the max (eg, because one has to assign distinctive colours to <i>dozens or hundreds of elements</i>), I have a JS library which includes a method for that:<p><pre><code>  // We have a viz with 50 items; let's assign colours to those items:
  import { palette } from 'supers';
  const colours = new palette(50);
  for (let i = 0; i < 50; i ++)
    chart[i].css('color', '#' + colours.get(i, true));
</code></pre>
Online demo: <a href="https://codepen.io/tripu/full/JEMBoN" rel="nofollow">https://codepen.io/tripu/full/JEMBoN</a><p>Documentation: <a href="https://github.com/tripu/superscript/blob/master/.github/README.md#Palette" rel="nofollow">https://github.com/tripu/superscript/blob/master/.github/REA...</a>