[GRASS-dev] any way to know color assigned to a cell?

Bob Covill bcovill at tekmap.ns.ca
Wed Apr 18 15:02:49 EDT 2007


On Wed, 2007-04-18 at 17:19 +0100, Glynn Clements wrote:
> Bob Covill wrote:
> 
> > > > > Yeah; we could probably do with a "r.what.colors" module.
> > > Michael:
> > > > I was contemplating a wxPython histograming module, like the TclTk
> > > > profiling module, and liked the option in d.histogram of being able to
> > > > use the color table for the histogram colors. But this seems like a
> > > > pretty intensive batch of calculations to do it.
> > > 
> > > 
> > > you could try "r.profile -c" with a profile which starts and stops at
> > > the cell center (length=0). Also it should be very simple to add a flag
> > > just like "r.profile -c" to r.what, if that helps.
> > 
> > I have a version of r.what that I modified to optionally output RGB
> > color. If interested I could commit to CVS?
> 
I have committed the change to r.what. It now has a "-r" flag (-c was
taken) that will output the RGB for the selected point.

Please test.

> It may be useful to have that feature in r.what, although there would
> still be some use for a module which looks up the colour for a
> user-supplied value (e.g. d.rast.edit.tcl needs to be able to
> determine the colour for new values which don't yet exist in the map).
> 




More information about the grass-dev mailing list