Increase or decrease color luma, chroma, or hue.
*/
ConvertRGBToHCL(*red,*green,*blue,&hue,&chroma,&luma);
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue > 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
chroma*=0.01*percent_chroma;
luma*=0.01*percent_luma;
ConvertHCLToRGB(hue,chroma,luma,red,green,blue);
Increase or decrease color luma, chroma, or hue.
*/
ConvertRGBToHCLp(*red,*green,*blue,&hue,&chroma,&luma);
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue > 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
chroma*=0.01*percent_chroma;
luma*=0.01*percent_luma;
ConvertHCLpToRGB(hue,chroma,luma,red,green,blue);
Increase or decrease color brightness, saturation, or hue.
*/
ConvertRGBToHSB(*red,*green,*blue,&hue,&saturation,&brightness);
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue > 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
saturation*=0.01*percent_saturation;
brightness*=0.01*percent_brightness;
ConvertHSBToRGB(hue,saturation,brightness,red,green,blue);
Increase or decrease color intensity, saturation, or hue.
*/
ConvertRGBToHSI(*red,*green,*blue,&hue,&saturation,&intensity);
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue > 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
saturation*=0.01*percent_saturation;
intensity*=0.01*percent_intensity;
ConvertHSIToRGB(hue,saturation,intensity,red,green,blue);
Increase or decrease color lightness, saturation, or hue.
*/
ConvertRGBToHSL(*red,*green,*blue,&hue,&saturation,&lightness);
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue >= 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
saturation*=0.01*percent_saturation;
lightness*=0.01*percent_lightness;
ConvertHSLToRGB(hue,saturation,lightness,red,green,blue);
Increase or decrease color value, saturation, or hue.
*/
ConvertRGBToHSV(*red,*green,*blue,&hue,&saturation,&value);
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue >= 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
saturation*=0.01*percent_saturation;
value*=0.01*percent_value;
ConvertHSVToRGB(hue,saturation,value,red,green,blue);
Increase or decrease color blackness, whiteness, or hue.
*/
ConvertRGBToHWB(*red,*green,*blue,&hue,&whiteness,&blackness);
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue >= 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
blackness*=0.01*percent_blackness;
whiteness*=0.01*percent_whiteness;
ConvertHWBToRGB(hue,whiteness,blackness,red,green,blue);
ConvertRGBToLCHab(*red,*green,*blue,&luma,&chroma,&hue);
luma*=0.01*percent_luma;
chroma*=0.01*percent_chroma;
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue >= 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
ConvertLCHabToRGB(luma,chroma,hue,red,green,blue);
}
ConvertRGBToLCHuv(*red,*green,*blue,&luma,&chroma,&hue);
luma*=0.01*percent_luma;
chroma*=0.01*percent_chroma;
- hue+=0.5*(0.01*percent_hue-1.0);
- while (hue < 0.0)
- hue+=1.0;
- while (hue >= 1.0)
- hue-=1.0;
+ hue+=fmod((percent_hue-100.0),200.0)/200.0;
ConvertLCHuvToRGB(luma,chroma,hue,red,green,blue);
}