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

Hamish hamish_nospam at yahoo.com
Sun Apr 22 07:19:50 EDT 2007

Glynn Clements wrote:
> Yeah; we could probably do with a "r.what.colors" module.


I notice r.what.color outputs colors as follows:

fprintf(stdout, "%d: %02x:%02x:%02x\n", ival, red, grn, blu);

ie  ff:ff:ff

the rest of GRASS uniformly uses/expects %d:%d:%d (255:255:255) for that.

suggestion: either use 0x%02x%02x%02x (0xaabbcc) if output is primariliy
meant for sending to Tcl, or %d:%d:%d (255:255:255) if meant to be
useful to GRASS. "ff:ff:ff" seems to be a mix of methods and an anomaly.

or is there another reason?
what RGB triplet pattern does xwPython prefer?


More information about the grass-dev mailing list