rem: RHSVColor	cur_hsv; int		i; int		v;
add: if (panel->color.set != cpHSV) convertCPColor(&panel->color);  WMSetSliderValue(panel->wheelBrightnessS, 255 - panel->color.hsv.value); wheelUpdateBrightnessGradient(panel, panel->color);
context: wheelInit(W_ColorPanel *panel){    RHSVColor	cur_hsv;    int		i;    int		v;        RRGBtoHSV(&panel->color, &cur_hsv);        WMSetSliderValue(panel->wheelBrightnessS, 255-cur_hsv.value);    wheelUpdateBrightnessGradientFromHSV(panel, cur_hsv);        panel->colx = 2 + rint((colorWheelSize / 2.0) * (1 + (							  cur_hsv.saturation/255.0) * cos( cur_hsv.hue*M_PI/180.0)));    panel->coly = 2 + rint((colorWheelSize / 2.0) * (1 + (							  cur_hsv.saturation/255.0) * sin(-cur_hsv.hue*M_PI/180.0)));        for (i = 0; i < 256; i++) {	/* We divide by 128 in advance, and check whether that number divides	 * by 2 properly. If not, we add one to round the number correctly	 */	v = (i*cur_hsv.value) >> 7;	panel->wheelMtrx->values[i] = (unsigned char)((v >> 1) + (v & 1));    }}