Here's a possibly good way to do it (I say possibly, because I didn't test it, but it feels like it ought to work). If you're using 8.5 or later, you could do this:

c1 = rgb(100,100,100)
c2 = rgb(123,100,100)
v1 = vector(c1.red,c1.green,c1.blue)
v2 = vector(c2.red,c2.green,c2.blue)
put v1.distanceto(v2)
-- 23.0000

You would count colors as being the same if their distance from the comparison color is less than a certain amount.

Nice. This seems to make the most conceptual sense, since the rgb color model is described in terms of 3d space. Performance might be a problem, though.


--
Cole
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to