return hsl_to_rgb(v_x * 6 * eX + eY + v_y / 0.875 * eZ);\r
}\r
\r
+vector color_hslimage(vector v, vector margin)\r
+{\r
+ vector pos;\r
+ v = rgb_to_hsl(v);\r
+ if (v_y)\r
+ {\r
+ pos_x = v_x / 6;\r
+ pos_y = v_z * 0.875;\r
+ }\r
+ else // grey scale\r
+ {\r
+ pos_x = v_z;\r
+ pos_y = 0.875 + 0.07;\r
+ }\r
+ pos_x = margin_x + pos_x * (1 - 2 * margin_x);\r
+ pos_y = margin_y + pos_y * (1 - 2 * margin_y);\r
+ return pos;\r
+}\r
+\r
float mouseDragVoretColorpicker(entity me, vector coords)\r
{\r
float i;\r
me.cvarName = theCvar;
me.configureImage(me, me.image);
if(cvar_string(theCvar) != "")
- me.prevcoords = hslimage_color(stov(cvar_string(theCvar)), me.imagemargin);
+ me.prevcoords = color_hslimage(stov(cvar_string(theCvar)), me.imagemargin);
else // use default
- me.prevcoords = hslimage_color(stov(cvar_string(theDefaultCvar)), me.imagemargin);
+ me.prevcoords = color_hslimage(stov(cvar_string(theDefaultCvar)), me.imagemargin);
}
float mousePressVoretColorpickerString(entity me, vector coords)