testing set of colors (rcolor)
by hrabinowitz
HTML
<script src="http://192.168.2.75/snaps/js/rcolor.js"></script>
<div id="colorDiv">
</div>
JavaScript
"use strict";
// goal is to pick a set of colors that is as distinct as possible over a continuing space of possibilities,
// while also retaining darkness (so distinct from gray which is useful for key rollover) and saturation.
// from lisa, from http://www.perceptualedge.com/articles/b-eye/choosing_colors.pdf, also from kuler
var definedColors = ['#FD7F10', '#BE9C21', '#8B574A','#A9CC66', '#5A1F00','#5D7359','#8C5430', '#661C0E',
// adding colors from http://eleanormaclure.files.wordpress.com/2011/03/colour-coding.pdf
'rgb(0, 117, 220)', // blue
'rgb(76, 0, 92)', // damson
'rgb(0, 92, 49)', // forest
'rgb(143, 124, 0)', //khaki
'rgb(194, 0, 136)', // mallow
'rgb(0, 51, 128)', // navy
'rgb(255, 164, 5)', // orpiment
'rgb(66, 102, 0)', // quagmire
'rgb(0, 153, 143)', // turquoise
'rgb(116, 10, 255)', // violet
'rgb(153, 0, 0)', // wine
'rgb(255, 80, 5)' // zinnia
/* , '#8DD3C7', '#BEBADA', '#FB8072', '#80B1D3', '#FDB462', '#B3DE69', '#FCCDE5', '#D9D9D9', '#BC80BD','#ff0000', '#0f0', '#050505', '#00f', '#f0f', '#ff0', '#0ff', '#ff0000', '#7f00ff','#7f0080', '7f7f80', '#7f8080', '#7f0000', '#ff7f00', '#807f7f', '#0000a0', '#008000', '#ff7fc0', '#5c2664', '#ffb817'
*/
];
var chartColors = definedColors;
// a color generator that uses Golden Ratio to evenly distribute colors
var rColor = new RColor();
// allow for up to 200 lines.
for (var i=chartColors.length; i<200; i++) {
// beyond definedColors use black
//chartColors[i] = 'black';
// beyond definedColors, use nicely spaced colors:
//chartColors[i] = rColor.get(true, .7,...