summaryrefslogtreecommitdiffstats
path: root/Smoke/palette.h
blob: a5ad512fe6a2069d90ab21ffa4a5337a72d07018 (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_BLUE_GREEN_RED 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_BLUE_GREEN_RED "Blue Green Red"
#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