GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
colors.h
Go to the documentation of this file.
1
#ifndef GRASS_COLORS_H
2
#define GRASS_COLORS_H
3
4
/* Don't add more colors here.
5
These colors are the preallocated colors used in displays for efficiency.
6
Adding colors here reduces the number of colors it is possible for a user to display.
7
If support for named colors is needed it should go in G_str_to_color. */
8
9
#define BLACK 1
10
#define RED 2
11
#define GREEN 3
12
#define BLUE 4
13
#define YELLOW 5
14
#define CYAN 6
15
#define MAGENTA 7
16
#define WHITE 8
17
#define GRAY 9
18
#define ORANGE 10
19
#define AQUA 11
20
#define INDIGO 12
21
#define VIOLET 13
22
#define BROWN 14
23
24
#define GREY GRAY
25
#define PURPLE VIOLET
26
27
/* These can be in any order. They must match the lookup strings in the table below. */
28
#define D_COLOR_LIST "red,orange,yellow,green,blue,indigo,violet,white,black,gray,brown,magenta,aqua,grey,cyan,purple"
29
30
/* max length of color string */
31
#define MAX_COLOR_LEN 32
32
33
struct
color_rgb
34
{
35
unsigned
char
r
,
g
,
b
;
36
};
37
38
struct
color_name
39
{
40
const
char
*
name
;
41
int
number
;
42
};
43
44
#include <
grass/defs/colors.h
>
45
46
#endif
colors.h
color_rgb::b
unsigned char b
Definition:
colors.h:35
color_name
Definition:
colors.h:38
color_name::name
const char * name
Definition:
colors.h:40
color_rgb
Definition:
colors.h:33
color_rgb::g
unsigned char g
Definition:
colors.h:35
color_rgb::r
unsigned char r
Definition:
colors.h:35
color_name::number
int number
Definition:
colors.h:41
include
grass
colors.h
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13