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

Glynn Clements glynn at gclements.plus.com
Wed Apr 18 12:19:46 EDT 2007


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?

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).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list