GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
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
7  display. If support for named colors is needed it should go in
8  G_str_to_color. */
9 
10 #define BLACK 1
11 #define RED 2
12 #define GREEN 3
13 #define BLUE 4
14 #define YELLOW 5
15 #define CYAN 6
16 #define MAGENTA 7
17 #define WHITE 8
18 #define GRAY 9
19 #define ORANGE 10
20 #define AQUA 11
21 #define INDIGO 12
22 #define VIOLET 13
23 #define BROWN 14
24 
25 #define GREY GRAY
26 #define PURPLE VIOLET
27 
28 /* These can be in any order. They must match the lookup strings in the table
29  * below. */
30 #define D_COLOR_LIST \
31  "red,orange,yellow,green,blue,indigo,violet,white,black,gray,brown," \
32  "magenta,aqua,grey,cyan,purple"
33 
34 /* max length of color string */
35 #define MAX_COLOR_LEN 32
36 
37 struct color_rgb {
38  unsigned char r, g, b;
39 };
40 
41 struct color_name {
42  const char *name;
43  int number;
44 };
45 
46 #include <grass/defs/colors.h>
47 
48 #endif
const char * name
Definition: colors.h:42
int number
Definition: colors.h:43
unsigned char g
Definition: colors.h:38
unsigned char b
Definition: colors.h:38
unsigned char r
Definition: colors.h:38