27 Jan 2013 sness   » (Journeyer)

bpostlethwaite/colormap · GitHub

bpostlethwaite/colormap · GitHub: "Super simple just do,

options = {
colormap: "jet" // pick your colormap
, nshades: 72 // how many divisions
, format: "hex" // "hex" or "rgb"
cg = colormap(options)
where leaving options = {} or undefined results in the defaults given above. There is a minimum number of nshades divisions you can select since the algorithms for each colormap have different requirements. colormap throws an error if there are too few divisions for the chosen colormap and gives the minimum number required. You should be safe with n > 10 for all the colormaps, though some require much less (much simpler to implemenent)."

Syndicated 2013-01-27 18:22:00 from sness

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!