On Jun 17, 2014, at 06:43:54, Maxthon Chan <[email protected]> wrote:

> One easy-to-implement method: colour cube.
> 
> Define a colour using its RGB values as a 3-tuple (r, g, b) and standard 
> colours (ri, gi, bi) (where i = 0..n).The square distance between the given 
> colour and a standard colour is (ri-r)^2+(gi-g)^2+(bi-b)^2. You can calculate 
> square distances between the given colour and each of the standard colours, 
> and the one with the minimal squared distance is the best match.

The algorithm I've seen then takes the square root of that value.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to