.TH r.what.color 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBr.what.color\fR\fR - Queries colors for a raster map layer. .SH KEYWORDS raster, querying .SH SYNOPSIS \fBr.what.color\fR .br \fBr.what.color help\fR .br \fBr.what.color\fR [\-\fBi\fR] \fBinput\fR=\fIstring\fR [\fBvalue\fR=\fIfloat\fR[,\fIfloat\fR,...]] [\fBformat\fR=\fIstring\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-i\fR" 4m .br Read values from stdin .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIstring\fR" 4m .br Name of existing raster map to query colors .IP "\fBvalue\fR=\fIfloat[,\fIfloat\fR,...]\fR" 4m .br Values to query colors for .IP "\fBformat\fR=\fIstring\fR" 4m .br Output format (printf-style) .br Default: \fI%d:%d:%d\fR .PP .SH DESCRIPTION \fIr.what.color\fR outputs the color associated with user-specified category values in a raster input map. .PP Values may be specified either using the \fBvalues=\fR option, or by specifying the \fB-i\fR flag and passing the values on stdin, one per line. .PP For each value which is specified, a line of output will be generated consisting of the category value followed by the color, e.g.: \fC .DS .br r.what.color input=elevation.dem value=1500 .br 1500: 223:127:31 .br .DE \fR .PP If the input map is an integer (CELL) map, the category will be written as an integer (no decimal point), otherwise it will be written in floating point format (\fIprintf("%.15g")\fR format). .PP If the lookup fails for a value, the color will be output as an asterisk, e.g.: \fC .DS .br r.what.color input=elevation.dem value=9999 .br 9999: * .br .DE \fR .PP If a value cannot be parsed, both the value and the color will be output as an asterisk, e.g.: \fC .DS .br r.what.color input=elevation.dem value=bogus .br *: * .br .DE \fR .PP The format can be changed using the \fBformat=\fR option. The value should be a \fIprintf()\fR-style format string containing three conversion specifiers for the red, green and blue values respectively, e.g.: \fC .DS .br r.what.color input=elevation.dem value=1500 format='%02x:%02x:%02x' .br 1500: df:7f:1f .br .DE \fR .PP If your system supports the \fI%m$\fR syntax, you can change the ordering of the components, e.g.: \fC .DS .br r.what.color input=elevation.dem value=1500 format='%3$02x:%2$02x:%1$02x' .br 1500: 1f:7f:df .br .DE \fR .PP Common formats: .br .RS .IP Tcl/Tk: format="#%02x%02x%02x" .IP WxPython: format='"#%02x%02x%02x"' or format='"(%d,%d,%d)"' .RE .SH SEE ALSO \fI r.what \fR .SH AUTHOR Glynn Clements .PP Full index .PP © 2003-2014 GRASS Development Team