I am looking for an algorithm that compares two RGB colors and generates a value for their similarity (where the similarity means "similar to the average human perception").
Any ideas?
EDIT
Since I can no longer answer, I decided to put my "solution" as an editing question.
I decided to go with a (very) small subset of true color in my application so that I can handle the color comparison as I see fit. I work with about 30 colors and use hardcoded distances between them.
Since this is an application for the iPhone, I worked with objective-C, and the implementation is more or less a matrix representing the table below, which shows the distances between the colors.

comparison algorithm colors rgb
Kai Huppmann Mar 22 2018-11-22T00: 00Z
source share