Autumn generates deterministic colors. It's great for coloring tags, navigation, and icons (this post demonstrates one such use case).
Include jQuery, HUSL (optional, but recommended), and Autumn.
<script src="jquery-1.10.1.min.js"/>
<script src="husl.min.js"/>
<script src="autumn.min.js"/>Then color as many elements as you want with a single line:
$("div").autumn();Generating random colors is fairly easy:
function randomColor(){
return 'hsl('+Math.random()*360+',100%,60%)';
}But generating lots of deterministic colors that look great together is a bit harder. Autumn has the following goals:
- Colors shouldn't interfere with text readability.
- Colors in a sequence should be easily distinguishable, especially consecutive colors.
- Colors should repeat infrequently.
Judge for yourself on the color profile demo.
Here.