1r.what.color(1)               Grass User's Manual              r.what.color(1)
2
3
4

NAME

6       r.what.color  - Queries colors for a raster map layer.
7

KEYWORDS

9       raster, querying, color table
10

SYNOPSIS

12       r.what.color
13       r.what.color --help
14       r.what.color   [-i]   input=string   [value=float[,float,...]]    [for‐
15       mat=string]   [--help]  [--verbose]  [--quiet]  [--ui]
16
17   Flags:
18       -i
19           Read values from stdin
20
21       --help
22           Print usage summary
23
24       --verbose
25           Verbose module output
26
27       --quiet
28           Quiet module output
29
30       --ui
31           Force launching GUI dialog
32
33   Parameters:
34       input=string [required]
35           Name of existing raster map to query colors
36
37       value=float[,float,...]
38           Values to query colors for
39
40       format=string
41           Output format (printf-style)
42           Default: %d:%d:%d
43

DESCRIPTION

45       r.what.color outputs the color associated with user-specified  category
46       values in a raster input map.
47
48       Values may be specified either using the values= option, or by specify‐
49       ing the -i flag and passing the values on stdin, one per line.
50
51       For each value which is specified, a line of output will  be  generated
52       consisting of the category value followed by the color, e.g.:
53       r.what.color input=elevation.dem value=1500
54       1500: 223:127:31
55
56       If the input map is an integer (CELL) map, the category will be written
57       as an integer (no decimal point),  otherwise  it  will  be  written  in
58       floating point format (printf("%.15g") format).
59
60       If  the lookup fails for a value, the color will be output as an aster‐
61       isk, e.g.:
62       r.what.color input=elevation.dem value=9999
63       9999: *
64
65       If a value cannot be parsed, both the value and the color will be  out‐
66       put as an asterisk, e.g.:
67       r.what.color input=elevation.dem value=bogus
68       *: *
69
70       The format can be changed using the format= option. The value should be
71       a printf()-style format string containing three  conversion  specifiers
72       for the red, green and blue values respectively, e.g.:
73       r.what.color input=elevation.dem value=1500 format=’%02x:%02x:%02x’
74       1500: df:7f:1f
75
76       If  your system supports the %m$ syntax, you can change the ordering of
77       the components, e.g.:
78       r.what.color input=elevation.dem value=1500 format=’%3$02x:%2$02x:%1$02x’
79       1500: 1f:7f:df
80
81       Common formats:
82
83           ·   Tcl/Tk: format="#%02x%02x%02x"
84
85           ·   WxPython: format=’"#%02x%02x%02x"’  or  format=’"(%d,%d,%d)"’
86

SEE ALSO

88        r.what
89

AUTHOR

91       Glynn Clements
92

SOURCE CODE

94       Available at: r.what.color source code (history)
95
96       Main index | Raster index | Topics index | Keywords index  |  Graphical
97       index | Full index
98
99       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
100
101
102
103GRASS 7.8.2                                                    r.what.color(1)
Impressum