[comp.windows.x] RGB color comparison

dal@midgardMidgard.MN.ORG (Dale Schumacher) (12/08/88)

I'm working on a color dithering algorithm and am trying to come up with
a good formula for comparing colors for "closeness".  Are there any good
formulas for taking two 24-bit RGB (8 bits per gun) color values and
returning a linear measure of difference between them?  Simply taking the
average difference of the components seems to bias the comparison against
changes which are strictly in luminence and gives too much latitude for
changes in chroma at the same luminence.