arcastroe 4 days ago

It'd be better to convert to HSL, and compute the distance from there.

HSL-distance preserves color similarity with higher fidelity than converting both pixels to greyscale as done in the shared link

2
oivey 4 days ago

That doesn’t address the issue at all. The issue is that discarding small changes in any color space is fundamentally lossy, so the algorithm isn’t lossless.

arcastroe 3 days ago

Well yes.. I agree.

But my comment was addressing parent's point that pure blue and pure red are currently considered close together since they share the same greyscale values.

Sesse__ 4 days ago

You mean something like L*ab, right, not HSL? HSL is a pretty terrible approximation to human vision.