GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
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
unsigned char b
Definition: colors.h:35
const char * name
Definition: colors.h:40
unsigned char g
Definition: colors.h:35
unsigned char r
Definition: colors.h:35
int number
Definition: colors.h:41