in reply to the difference between two colors, and how to describe a color
If you're hell-bent on doing this by hand the way you've suggested, I'd look to see how programs like Gimp calculate deltas between pixels. For instance, Gimp's Selective Gaussian Blur will blur pixels only within a certain delta "difference" and it seems to do a good job. From the source code, it's not clear how this is calculated, but it probably relies on Gimp's internal colorspace. Maybe there is an Gimp IRC channel you could consult to get pointers to the math they use.
In any case, just using luminosity (as in your last example) won't find many types of boundaries in between solid colors. The two 3-dimensional RGB metrics you use are probably better (and probably not too different from each other).
blokhead
|
|---|