.TH r.what.color 1grass "" "GRASS 8.3.1" "GRASS GIS User's Manual" .SH NAME \fI\fBr.what.color\fR\fR \- Queries colors for a raster map layer. .SH KEYWORDS raster, querying, color table .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] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-i\fR" 4m .br Read values from stdin .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIstring\fR \fB[required]\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 .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.: .br .nf \fC r.what.color input=elevation.dem value=1500 1500: 223:127:31 \fR .fi .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(\(dq%.15g\(dq)\fR format). .PP If the lookup fails for a value, the color will be output as an asterisk, e.g.: .br .nf \fC r.what.color input=elevation.dem value=9999 9999: * \fR .fi .PP If a value cannot be parsed, both the value and the color will be output as an asterisk, e.g.: .br .nf \fC r.what.color input=elevation.dem value=bogus *: * \fR .fi .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.: .br .nf \fC r.what.color input=elevation.dem value=1500 format=\(cq%02x:%02x:%02x\(cq 1500: df:7f:1f \fR .fi .PP If your system supports the \fI%m$\fR syntax, you can change the ordering of the components, e.g.: .br .nf \fC r.what.color input=elevation.dem value=1500 format=\(cq%3$02x:%2$02x:%1$02x\(cq 1500: 1f:7f:df \fR .fi .PP Common formats: .br .RS 4n .IP \(bu 4n Tcl/Tk: format=\(dq#%02x%02x%02x\(dq .IP \(bu 4n WxPython: format=\(cq\(dq#%02x%02x%02x\(dq\(cq or format=\(cq\(dq(%d,%d,%d)\(dq\(cq .RE .SH SEE ALSO \fI r.what \fR .SH AUTHOR Glynn Clements .SH SOURCE CODE .PP Available at: r.what.color source code (history) .PP Accessed: Sunday Dec 17 17:22:09 2023 .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual