Find out if color A is closer to color B or color C?

Let’s say I have a Color A (135, 195, 199) and I want to know if the color is more closer to Color B(127, 162, 163) or Color C(176, 250, 212).

Is there’s such a formula to find out the distance between the two colors to determine which color is more similar? Thanks!

The easy solution is to treat them as 3D vector and calculate the distance between to points, but the problem is that not all colour models are perceptually correct, and RGB, while is good for computers calculations, gives more space to some colours than others, when you talk in perceived colour terms.

A better approximation is to convert your colours to a different colour model, and the calculate the distance. The is a nice explanation in this online calculator
http://colormine.org/delta-e-calculator

5 Likes