#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