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 ind
I've been searching Pascal code for a solution.
I dropped the Pascal restriction and found this question.
The Red(), Green() and Blue() functions replace the "parseInt"s.
Result:=(R/255+G/255+B/255)/3
replaced
r /= 255; g /= 255; b /= 255; return (r + g + b) / 3;
Bazza