Followup: Finding an accurate “distance” between colors

Convert to La*b* (aka just plain “Lab”, and you’ll also see reference to “CIELAB”). A good quick measaure of color difference is

(L1-L2)^2 + (a1-a2)^2 + (b1-b2)^2

Color scientists have other more refined measures, which may not be worth the bother, depending on accuracy needed for what you’re doing.

The a and b values represent opposing colors in a way similar to how cones work, and may be negative or positive. Neutral colors – white, grays are a=0,b=0. The L is brightness defined in a particular way, from zero (pure darkness) up to whatever.

Crude explanation :>> Given a color, our eyes distinguish between two broad ranges of wavelength – blue vs longer wavelengths. and then, thanks to a more recent genetic mutation, the longer wavelength cones bifurcated into two, distinguishing for us red vs. green.

By the way, it’ll be great for your career to rise above your color caveman collegues who know of only “RGB” or “CMYK” which are great for devices but suck for serious perception work. I’ve worked for imaging scientists who didn’t know a thing about this stuff!

For more fun reading on color difference theory, try:

More detail on Lab at http://en.kioskea.net/video/cie-lab.php3 I can’t at this time find a non-ugly page that actually had the conversion formulas but I’m sure someone will edit this answer to include one.

Leave a Comment