rem: color.red = color.green = color.blue = rint(255.0*i/6.0);
add: cpColor.rgb.red = cpColor.rgb.green = cpColor.rgb.blue = rint((255.0*i)/6.0); cpColor.set = cpRGB;
context: grayPresetButtonCallback(WMWidget *w, void *data){    RColor		color;    char		tmp[4];    int			value;    int			i=0;    W_ColorPanel	*panel = (W_ColorPanel*)data;        while (i < 7) {	if (w == panel->grayPresetBtn[i])	    break;	i++;    }        value = rint(100.0/6.0*i);    sprintf(tmp, "%d", value);        WMSetTextFieldText(panel->grayBrightnessT, tmp);    color.red = color.green = color.blue = rint(255.0*i/6.0);        WMSetSliderValue(panel->grayBrightnessS, rint(100.0*i/6.0));        updateSwatch(panel, color);    panel->lastChanged = WMGrayModeColorPanel;}