From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Michaelson To: 9fans@cse.psu.edu Message-Id: <20030221160829.1b2eca90.ggm@apnic.net> In-Reply-To: <82b065d91f919c7c32a7dc45b32ffff9@plan9.bell-labs.com> References: <82b065d91f919c7c32a7dc45b32ffff9@plan9.bell-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [9fans] alg to make a good colour palette for a graph Date: Fri, 21 Feb 2003 16:08:29 +1000 Topicbox-Message-UUID: 6c9e98e2-eacb-11e9-9e20-41e7f4b1d025 totally non Plan9 question but people here oftentimes have nice simple algs which work well across lots of contexts. I need to make a set of visually distinctive colours in rgb space such that I can feed the rgb values into a tool (RRD) to graph with. Microsloth picks colours for you. a very nasty muted set. Gnuplot repeats the same palette of colours over and over again. I read in the RRD list of a technique to map the as equidistant points distributed in HSV space, and then use them. But, no code. N varies. Usually its less than 15. In those cases I think I can use an Acronymic 'Richard Of York Gave Battle In Vain' selection. But for one case I am looking at, I need 250+ reasonably distinctive colours. I thought about just taking a 256colourmap, and randomizing it, and using the entire palette that way. It should mean no two adjacent colours are very alike which is fine for a stacked line chart. Is there something simple and nice, which I can do in AWK? Something which will go into the ff-space and pick good colour combos? The obvious things I come up with make gray (for a stunningly obvious reason) It would be super nice to have up to 25 or 30 colours which are all mutually equi-distant in some sense. clues? I've tried web browsing. its phenominal how few things seem remotely relevant from keyword searches using colourspace, colourmap, palette, graph. -George