Hiyas,

Let's set the scene - I have a world map in a game. There's three colours - the clicked colour, and two other colours which represent two different terrain types.

Say we have a dark tropical rainforest and grassland for the two different terrain types.

The clicked colour is somewhere in between the above colours, perhaps a slightly dark green.

How do I figure out which one it's closer to, taking into account the actual colour and the shading? (eg. it would pick blue over red if the colour picked was green)

I'm using the GetPixel function and I have the value in RGB.

Hope someone knows what I'm talking about... =)

Thanks.

-Git