Hue-Saturation dialog
The file app/huesaturation.c contains a conceptual bug. Have a look at the
function hue_saturation:
if (r < 43)
hue = 0;
else if (r < 85)
hue = 1;
else if (r < 128)
hue = 2;
else if (r < 171)
hue = 3;
else if (r < 213)
hue = 4;
else
hue = 5;
hue = 0 stands for red but in reality it is red ... [yellow]
hue = 1 stands for red but in reality it is yellow ... [green]
hue = 2 stands for red but in reality it is green ... [cyan]
hue = 3 stands for red but in reality it is cyan ... [blue]
hue = 4 stands for red but in reality it is blue ... [magenta]
hue = 5 stands for red but in reality it is magenta ... [red]
So in the dialog red stands for a red color that can also be nearly pure
yellow, but a color that looks nearly red with a small percentage of magenta you
will not find as red but as magenta only. This behaviour confuses the user.
Red should be a red with a certain percentage of yellow as well as a red with
a certain percentage of magenta. So here is the corrected code:
if (r < 21)
hue = 0;
else if (r < 64)
hue = 1;
else if (r < 106)
hue = 2;
else if (r < 149)
hue = 3;
else if (r < 191)
hue = 4;
else if (r < 234)
hue = 5;
else
hue = 0;