5 #define colormapPaletteColor(c, isPants) colormapPaletteColor_(c, isPants, time) 17 case 0:
return '1.000000 1.000000 1.000000';
18 case 1:
return '1.000000 0.333333 0.000000';
19 case 2:
return '0.000000 1.000000 0.501961';
20 case 3:
return '0.000000 1.000000 0.000000';
21 case 4:
return '1.000000 0.000000 0.000000';
22 case 5:
return '0.000000 0.666667 1.000000';
23 case 6:
return '0.000000 1.000000 1.000000';
24 case 7:
return '0.501961 1.000000 0.000000';
25 case 8:
return '0.501961 0.000000 1.000000';
26 case 9:
return '1.000000 0.000000 1.000000';
27 case 10:
return '1.000000 0.000000 0.501961';
28 case 11:
return '0.000000 0.000000 1.000000';
29 case 12:
return '1.000000 1.000000 0.000000';
30 case 13:
return '0.000000 0.333333 1.000000';
31 case 14:
return '1.000000 0.666667 0.000000';
34 return '1 0 0' * (0.502 + 0.498 *
sin(t /
M_E + 0))
35 +
'0 1 0' * (0.502 + 0.498 *
sin(t /
M_E +
M_PI * 2 / 3))
36 +
'0 0 1' * (0.502 + 0.498 *
sin(t /
M_E +
M_PI * 4 / 3));
38 return '1 0 0' * (0.502 + 0.498 *
sin(t /
M_PI +
M_PI * 5 / 3))
40 +
'0 0 1' * (0.502 + 0.498 *
sin(t /
M_PI +
M_PI * 1 / 3));
41 default:
return '0.000 0.000 0.000';
54 if (rgb.y >= rgb.z)
return (rgb.y - rgb.z) / (ma - mi);
55 else return (rgb.y - rgb.z) / (ma - mi) + 6;
59 return (rgb.z - rgb.x) / (ma - mi) + 2;
63 return (rgb.x - rgb.y) / (ma - mi) + 4;
72 hue -= 6 *
floor(hue / 6);
79 rgb.y = hue * (ma - mi) + mi;
86 rgb.x = (2 - hue) * (ma - mi) + mi;
94 rgb.z = (hue - 2) * (ma - mi) + mi;
101 rgb.y = (4 - hue) * (ma - mi) + mi;
106 rgb.x = (hue - 4) * (ma - mi) + mi;
116 rgb.z = (6 - hue) * (ma - mi) + mi;
128 mi =
min(rgb.x, rgb.y, rgb.z);
129 ma =
max(rgb.x, rgb.y, rgb.z);
134 if (ma == 0) hsv.y = 0;
135 else hsv.y = 1 - mi / ma;
152 mi =
min(rgb.x, rgb.y, rgb.z);
153 ma =
max(rgb.x, rgb.y, rgb.z);
157 hsl.z = 0.5 * (mi + ma);
158 if (mi == ma) hsl.y = 0;
159 else if (hsl.z <= 0.5) hsl.y = (ma - mi) / (2 * hsl.z);
161 hsl.y = (ma - mi) / (2 - 2 * hsl.z);
169 float mi, ma, maminusmi;
171 if (hsl.z <= 0.5) maminusmi = hsl.y * 2 * hsl.z;
172 else maminusmi = hsl.y * (2 - 2 * hsl.z);
176 mi = hsl.z - 0.5 * maminusmi;
177 ma = hsl.z + 0.5 * maminusmi;
ERASEABLE vector hsl_to_rgb(vector hsl)
ERASEABLE vector hsv_to_rgb(vector hsv)
#define DEC_TO_HEXDIGIT(d)
ERASEABLE vector rgb_to_hsl(vector rgb)
ERASEABLE vector rgb_to_hsv(vector rgb)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
vector(float skel, float bonenum) _skel_get_boneabs_hidden
ERASEABLE float rgb_mi_ma_to_hue(vector rgb, float mi, float ma)
ERASEABLE string rgb_to_hexcolor(vector rgb)
ERASEABLE vector hue_mi_ma_to_rgb(float hue, float mi, float ma)
ERASEABLE vector colormapPaletteColor_(int c, bool isPants, float t)