Does anyone know of a way of taking two hex colour values and returning some kind of index to say how similar the colours are? e.g two shades of yellow might return a higher index i.e they are more similar than say a grey and yellow?
(Im using javascript but guess something like this would be a language independent formula/algorithm)