wvanbergen/chunky_png — pull request #63 by lencioni (2014-04-14 01:39:31+00:00)
Title: Add Color#euclidean_distance_rgba

This method simply takes the Euclidean distance[1] between the RGBA
channels of 2 colors, which gives us a measure of how different the two
colors are.

Although it would be more perceptually accurate to calculate a proper
Delta E in Lab colorspace[3], this method should serve many use-cases
while avoiding the overhead of converting RGBA to Lab.

[1]: http://en.wikipedia.org/wiki/Euclidean_distance
[2]: http://en.wikipedia.org/wiki/Color_difference#Delta_E
[3]: http://en.wikipedia.org/wiki/Lab_color_space