Hacker News new | ask | show | jobs
by crb002 4656 days ago
I would do it in RGB space. Run kmeans to get a set of Voronoi cell centroids, 5-6 should be good. Then take the Delaunay triangulation of that and pick a color midpoint between Voronoi neighbors that maximizes the distance sum from all the Voronoi generator points.

[1] http://en.wikipedia.org/wiki/File:Delaunay_Voronoi.svg

[2] http://people.sc.fsu.edu/~jburkardt/isu/reu_2001/voronoi_pap...