blob: d560cb8025c9e57b24f649cbd8ff8c5e07eee689 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef _PALETTE_H
#define _PALETTE_H
#define PALETTE_BLACKWHITE 0
#define PALETTE_RAINBOW 1
#define PALETTE_BANDS 2
#define PALETTE_GREY_BANDS 3
#define PALETTE_WILRIK 4
#define PALETTE_OLIVER 5
#define PALETTE_RED 6
#define PALETTE_GREEN 7
#define PALETTE_BLUE 8
#define PALETTE_NAME_BLACKWHITE "Black and white"
#define PALETTE_NAME_RAINBOW "Rainbow"
#define PALETTE_NAME_BANDS "7 band rainbow"
#define PALETTE_NAME_GREY_BANDS "Grey bands"
#define PALETTE_NAME_WILRIK "Wilrik"
#define PALETTE_NAME_OLIVER "Oliver"
#define PALETTE_NAME_RED "Red only"
#define PALETTE_NAME_GREEN "Green only"
#define PALETTE_NAME_BLUE "Blue only"
#define PALETTE_MAXCOLORS 256
struct color4f {
float r;
float g;
float b;
float a;
};
void HSVtoRGB(float *r, float *g, float *b, float h, float s, float v);
void RGBtoHSV(float r, float g, float b, float *h, float *s, float *v);
struct color4f set_palette(int colormap_sort, float value, int num_colors);
#endif
|