GRASS 8 Programmer's Manual 8.6.0dev(2026)-745b61fbf6
Loading...
Searching...
No Matches
color_compat.c File Reference

Raster Library - Predefined color tables. More...

#include <grass/gis.h>
#include <grass/raster.h>
Include dependency graph for color_compat.c:

Go to the source code of this file.

Functions

void Rast_make_wave_colors (struct Colors *colors, CELL min, CELL max)
 Make color wave (integer)
 
void Rast_make_wave_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Make color wave (floating-point)
 
void Rast_make_ryg_colors (struct Colors *colors, CELL min, CELL max)
 Create RYG color table (integer)
 
void Rast_make_ryg_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Create RYG color table (floating-point)
 
void Rast_make_ramp_colors (struct Colors *colors, CELL min, CELL max)
 Make color ramp (integer)
 
void Rast_make_ramp_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Make color ramp (floating-point)
 
void Rast_make_rainbow_colors (struct Colors *colors, CELL min, CELL max)
 Make rainbow colors (integer)
 
void Rast_make_rainbow_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Make rainbow colors (floating-point)
 
void Rast_make_gyr_colors (struct Colors *colors, CELL min, CELL max)
 Create GYR color table (integer)
 
void Rast_make_gyr_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Create GYR color table (floating-point)
 
void Rast_make_grey_scale_colors (struct Colors *colors, CELL min, CELL max)
 Make linear grey scale (integer)
 
void Rast_make_grey_scale_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Make linear grey scale (floating-point)
 
void Rast_make_byr_colors (struct Colors *colors, CELL min, CELL max)
 Create BYR color table (integer)
 
void Rast_make_byr_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Create BYR color table (floating-point)
 
void Rast_make_bgyr_colors (struct Colors *colors, CELL min, CELL max)
 Create BGYR color table (integer)
 
void Rast_make_bgyr_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Create BGYR color table (floating-point)
 
void Rast_make_byg_colors (struct Colors *colors, CELL min, CELL max)
 Create BYG color table (integer)
 
void Rast_make_byg_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Create BYG color table (floating-point)
 
void Rast_make_aspect_colors (struct Colors *colors, CELL min, CELL max)
 Make aspect colors (integer)
 
void Rast_make_aspect_fp_colors (struct Colors *colors, DCELL min, DCELL max)
 Make aspect colors (floating-point)
 

Detailed Description

Raster Library - Predefined color tables.

SPDX-FileCopyrightText: 2007-2009 Glynn Clements SPDX-FileCopyrightText: GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later

Author
Glynn Clements glynn.nosp@m.@gcl.nosp@m.ement.nosp@m.s.pl.nosp@m.us.co.nosp@m.m

Definition in file color_compat.c.

Function Documentation

◆ Rast_make_aspect_colors()

void Rast_make_aspect_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Make aspect colors (integer)

Generates a color table for aspect data.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 297 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_aspect_fp_colors()

void Rast_make_aspect_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Make aspect colors (floating-point)

Generates a color table for aspect data.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 311 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_bgyr_colors()

void Rast_make_bgyr_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Create BGYR color table (integer)

Generates a color table blue-green-yellow-red.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 241 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_bgyr_fp_colors()

void Rast_make_bgyr_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Create BGYR color table (floating-point)

Generates a color table blue-green-yellow-red.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 255 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_byg_colors()

void Rast_make_byg_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Create BYG color table (integer)

Generates a color table blue-yellow-green.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 269 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_byg_fp_colors()

void Rast_make_byg_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Create BYG color table (floating-point)

Generates a color table blue-yellow-green.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 283 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_byr_colors()

void Rast_make_byr_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Create BYR color table (integer)

Generates a color table blue-yellow-red.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 213 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_byr_fp_colors()

void Rast_make_byr_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Create BYR color table (floating-point)

Generates a color table blue-yellow-red.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 227 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_grey_scale_colors()

void Rast_make_grey_scale_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Make linear grey scale (integer)

Generates a grey scale color table. Each color is a level of grey, increasing from black to white.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 184 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_grey_scale_fp_colors()

void Rast_make_grey_scale_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Make linear grey scale (floating-point)

Generates a grey scale color table. Each color is a level of grey, increasing from black to white.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 199 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_gyr_colors()

void Rast_make_gyr_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Create GYR color table (integer)

Generates a color table green-yellow-red.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 155 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_gyr_fp_colors()

void Rast_make_gyr_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Create GYR color table (floating-point)

Generates a color table green-yellow-red.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 169 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_rainbow_colors()

void Rast_make_rainbow_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Make rainbow colors (integer)

Generates a "shifted" rainbow color table - yellow to green to cyan to blue to magenta to red. The color table is based on rainbow colors. (Normal rainbow colors are red, orange, yellow, green, blue, indigo, and violet.) This table is good for continuous data, such as elevation.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 123 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_rainbow_fp_colors()

void Rast_make_rainbow_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Make rainbow colors (floating-point)

Generates a "shifted" rainbow color table - yellow to green to cyan to blue to magenta to red. The color table is based on rainbow colors. (Normal rainbow colors are red, orange, yellow, green, blue, indigo, and violet.) This table is good for continuous data, such as elevation.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 141 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_ramp_colors()

void Rast_make_ramp_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Make color ramp (integer)

Generates a color table with 3 sections: red only, green only, and blue only, each increasing from none to full intensity. This table is good for continuous data, such as elevation.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 89 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_ramp_fp_colors()

void Rast_make_ramp_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Make color ramp (floating-point)

Generates a color table with 3 sections: red only, green only, and blue only, each increasing from none to full intensity. This table is good for continuous data, such as elevation.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 105 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_ryg_colors()

void Rast_make_ryg_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Create RYG color table (integer)

Generates a color table red-yellow-green.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 59 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_ryg_fp_colors()

void Rast_make_ryg_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Create RYG color table (floating-point)

Generates a color table red-yellow-green.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 73 of file color_compat.c.

References max, min, and Rast_make_fp_colors().

◆ Rast_make_wave_colors()

void Rast_make_wave_colors ( struct Colors colors,
CELL  min,
CELL  max 
)

Make color wave (integer)

Generates a color table with 3 sections: red only, green only, and blue only, each increasing from none to full intensity and back down to none. This table is good for continuous data like elevation.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 28 of file color_compat.c.

References max, min, and Rast_make_colors().

◆ Rast_make_wave_fp_colors()

void Rast_make_wave_fp_colors ( struct Colors colors,
DCELL  min,
DCELL  max 
)

Make color wave (floating-point)

Generates a color table with 3 sections: red only, green only, and blue only, each increasing from none to full intensity and back down to none. This table is good for continuous data like elevation.

Parameters
colorspointer to Colors structure which holds color info
minminimum value
maxmaximum value

Definition at line 45 of file color_compat.c.

References max, min, and Rast_make_fp_colors().