Skip to content

r3.colors.out

Exports the color table associated with a 3D raster map.

r3.colors.out [-p] map=name [rules=name] format=name color_format=name [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r3.colors.out map=name format=plain color_format=hex

grass.script.parse_command("r3.colors.out", map, rules=None, format="plain", color_format="hex", flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.parse_command("r3.colors.out", map="name", format="json", color_format="hex")

Parameters

map=name [required]
    Name of 3D raster map
rules=name
    Path to output rules file
    If not given write to standard output
format=name [required]
    Output format
    Allowed values: plain, json
    Default: plain
    plain: Plain text output
    json: JSON (JavaScript Object Notation)
color_format=name [required]
    Color format
    Color format for output values.
    Allowed values: rgb, hex, hsv, triplet
    Default: hex
    rgb: output color in RGB format
    hex: output color in HEX format
    hsv: output color in HSV format (experimental)
    triplet: output color in colon-separated RGB format
-p
    Output values as percentages
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

map : str, required
    Name of 3D raster map
    Used as: input, raster_3d, name
rules : str, optional
    Path to output rules file
    If not given write to standard output
    Used as: output, file, name
format : str, required
    Output format
    Used as: name
    Allowed values: plain, json
    plain: Plain text output
    json: JSON (JavaScript Object Notation)
    Default: plain
color_format : str, required
    Color format
    Color format for output values.
    Used as: name
    Allowed values: rgb, hex, hsv, triplet
    rgb: output color in RGB format
    hex: output color in HEX format
    hsv: output color in HSV format (experimental)
    triplet: output color in colon-separated RGB format
    Default: hex
flags : str, optional
    Allowed values: p
    p
        Output values as percentages
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

r3.colors.out allows the user to export the color table for a 3D raste map to a file which is suitable as input to r3.colors.

EXAMPLES

r3.colors.out map=volume_1 rules=rules.txt
r3.colors map=volume_2 rules=rules.txt
r3.colors.out map=volume_1 rules=rules.json format=json

SEE ALSO

r.colors, r.colors.out, r3.colors v.colors, v.colors.out

AUTHOR

Glynn Clements

SOURCE CODE

Available at: r3.colors.out source code (history)
Latest change: Saturday Feb 22 12:35:21 2025 in commit c12df29