Boreas
2010-02-24 00:58:28
Edit: Resolved. When working with relatively narrow color ranges with low tols, remember that there are so many more H,S,L combos than colors that a difference of 7 in H results in the same color.
I guess having a bigger range than expected isn't the worst thing in the world, but the thing is I only need a small range (H 99-1 S 96-100 L 49-51). Can anyone explain the difference?
//SCAR
{program New;
var TolSpeed:integer;
begin
TolSpeed := GetColorToleranceSpeed;
Colortolerancespeed(2);
SetColorspeed2Modifiers(5.0, 0.0);
writeln(booltostr(SimilarColors(HSLToColor(7,4,4),HSLToColor(14,4,4),1)));
SetColorspeed2Modifiers(0.2, 0.2);
Colortolerancespeed(TolSpeed);
//5.0 times 1 is 5, so it should result true when the H's are within 5
//yet 14-7 is 7, and it's still true
end.}
//SIMBA
{program new;
var TolSpeed:integer;
HMod, SMod: extended;
begin
TolSpeed := GetToleranceSpeed;
SetColorToleranceSpeed(2);
GetToleranceSpeed2Modifiers(HMod, SMod);
SetToleranceSpeed2Modifiers(5, 0);
writeln(booltostr(SimilarColors(HSLToColor(7,4,4),HSLToColor(14,4,4),1)));
SetToleranceSpeed2Modifiers(HMod, SMod);
SetColorToleranceSpeed(TolSpeed);
//5.0 times 1 is 5, so it should result true when the H's are within 5
//yet 14-7 is 7, and it's still true
end. }I guess having a bigger range than expected isn't the worst thing in the world, but the thing is I only need a small range (H 99-1 S 96-100 L 49-51). Can anyone explain the difference?