Skip to content

federicospini/unique-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Perceptually unique colors generator (up to 92)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published