flot/flot — pull request #63 by dnschnur (2012-07-18 14:03:59+00:00)
Title: Better legend colors

The color generator produces variations from a limited number of base colors. Since it scales by an increasing amount, it fairly quickly (at around 30-50 series) reaches a point where it generates only white and black.

This pull request works around the problem by resetting the variation when it grows too large. This results in the generation of duplicate colors, but that's still much better than a plot full of mostly white and black.

I've also cleaned up and optimized the color generation code.