Compare colours to get difference...
Posted on 2005-04-06
I need a function that takes in two colour values (long) and returns the an integer represtenting the similarity between the colours...
I.E, Public Function ColourCompare(Col1 as Long, Col2 as long) as Integer
The returned integer should be a percentage of how similar the colours are. In other words, if Col1 is Black and Col2 is White, then 0 should be returned as the colours are completely opposite and so there is a 0% similarity. If Col1 and Col2 are both Red then 100 should be returned as the colours are identical and so are 100% similar.