unique-colors
v1.0.1
Published
Unique colors generator
Downloads
9
Readme
unique-colors
It uses CMC(I:c) color differencing algorithm to procedurally generate a set of visually-distinguishable colors. Actually 92 different colors are precomputed and only used when needed.
Including in a browser
Download tinycolor.js or install it with bower:
bower install spini/unique-colors
Then just include it in the page in a script tag:
<script src='(...)/unique-colors.js'></script>
APIs
unique_colors(n)
Returns an array containing n different hex color codes (always the same ones).
unique_shuffled_colors(n)
Returns an array containing n different and shuffled hex color codes.