[GRASS-user] Application of r.color
Glynn Clements
glynn at gclements.plus.com
Sat Oct 2 15:25:02 EDT 2010
Micha Silver wrote:
> > I have a script where I create a map (using mapcalc) and I want to
> > attribute a color (gray for instance) but it ranges from 0 to 5 so I
> > cannot attribute gray0-1 neither gray0-255. What can I do to attribute
> > a color table that stretches its color attibution to the image max and
> > minimum values?
> >
> How about creating a color rules file with percentages (instead of
> values), then, regardless of the actual raster values, the colors will
> be "automatically" spread between the min and max color. i.e.
> 0% 0 0 0
> 100% 255 255 255
> This will create a spread of colors from black to white.
That's exactly what color=grey does:
$ cat $GISBASE/etc/colors/grey
0% black
100% white
More generally, these use only relative (percentage) values:
aspect bcyr bgyr byg byr elevation grey gyr haxby rainbow ramp
ryb ryg sepia wave
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list