[rrd-users] Re: CDEFs and graduated colors
serge.maandag at staff.zeelandnet.nl
Wed Apr 30 22:40:06 MEST 2003
Check out the hsv color model:
By changing the hue in the hsv color model you can calculate colors that fluently go from blue to red.
Check out this newsgroup article:
It features code to convert rgb to hsv and vice versa.
Combine it with your idea and make a routine that returns an array of rgb values to spread over your cdefs.
> Been trying to get my head round a little problem with RRD. I've set it up
> to print some pretty flame graphs using CDEFs - basically by making 255
> CDEFs each 1/255th of the data value and stacking them up with a color which
> increments from blue to red.
> What I was looking to do was come up with a way to have the color get redder
> ( i.e. hotter ) as the actual value increases. So for example a graph
> showing data ranging from 0 - 25% would be a comforting blueish-purple ,
> while one getting to 70 odd percent would have a blue base with a "flame"
> that gets pretty red at the top of the graph.
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users