View Full Version : Calculate Color Proximity

08-04-2007, 11:00 PM

I want to compare 1 color (hex or rgb) with a list of colors and choose the more similar of the list.

For example I have #FF1202 and an array with:

array ("FF0000", "00FF00", "0000FF" ...);

I need to find the color more similar in the list (in this case the first: FF0000).

Anyone has an idea?


08-05-2007, 01:59 AM
Take a look at this:

Download the example and script and see if you can use it.
I think it not only lets the user know if their color is "safe" or not,
but also provides the nearest safe color ... similar to what you are doing?

08-05-2007, 02:04 AM
Thank you, I'll check this. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum