The saturation filter uses one parameter s
to specify the output image color saturation.
The parameter value ranges
from 0.0 (grayscale) via 1.0 (original colors) to 2.0 (full saturation).
double RW = 0.3086; // or 0.299 for YIV values double RG = 0.6084; // or 0.587 for YIV values double RB = 0.0820; // or 0.114 for YIV values a = (1 - s) * RW + s; b = (1 - s) * RW; c = (1 - s) * RW; d = (1 - s) * RG; e = (1 - s) * RG + s; f = (1 - s) * RG; g = (1 - s) * RB; h = (1 - s) * RB; i = (1 - s) * RB + s; output_red = a*red + d*green + g*blue; output_green = b*red + e*green + h*blue; output_blue = c*red + f*green + i*blue; output_alpha = alpha;Run the applet | Run the editor (via Webstart)