I tested your suggestions wp and got some interesting results.
When I set the TColor variable nocolor1 to your suggestion of $1FFFFFFE then the program searched through
all 16777215 (ie 0 to 16777214) palatte colors without finding a match, which is good because it means that
nocolor1 does not exist on the palatte and I can use it as a workcolor. However, when I applied that color to
image13 and then took a color sampling of image13 the program showed the result as $00FFFFFE, not $1FFFFFFE.
When I set nocolor1 to $00FFFFFE and applied it to image13 then a color sampling showed $00FFFFFE but a
search of the palatte colors was only successful if the search was limited to 16777214 colors, not 16777215 colors.
The code I used is shown below.
I must be missing something here or this situation is simply due to a formatting issue or something like that.
The results are encouraging. Should I use $1FFFFFFE or $00FFFFFE?
Thank you so much.
nocolor1 := StringToColor('$1FFFFFFE');
go := true;
cancel := false;
header := '$';
found := false;
counter := 0;
while (go = true) and (cancel = false) do
begin
if counter <= 16777214 then
begin
tempstr := IntToHex(counter,6);
tempstr := header+tempstr;
newcolor := StringToColor(tempstr);
end
else
go := false;
if go then
if (newcolor = nocolor1) then
begin
go := false;
found := true;
end;
if (go = true) and (counter >= 100000) and ((counter mod 100000) = 0) then
begin
str(counter,tempstr);
edit4.text := tempstr;
application.processmessages;
end;
if counter = 16777214 then
go := false
else
counter := counter + 1;
end;
str(counter,tempstr);
edit4.text := tempstr;
application.processmessages;
if found = true then
edit5.text := 'nocolor1 exists on palatte.'
else
edit5.text :='nocolor1 does not exist on palatte';