I would like to know the algorithm to increase or decrease one RGB color saturation
for example if I have the color rgb(200, 30, 40) (red) the function stub would be
function Saturation(color, factor)
where color.r = 200, color.g= 30 and color.b=40
Anyone knows a library or has a code snippet that does that?
Following Bali Balo suggestion I came up with:
by converting to the HSV (hue, saturation and value) format you can manually change the S component in this manner: