8 comments

[ 2.9 ms ] story [ 34.3 ms ] thread
Nice, butit would benice to see side by side comparison in each method and also the effect on a real photo.
Just because the colors in the top row get converted to a nice white to gray gradient doesn't make it right (or even better).

If you for example look at the full color spectrum to the lower right the first conversion makes more sense then the last. (at least in my opinion)

Something doesn’t seem to be right with either your visual perception or your display device.
One should really use CIELAB colour space for visually accurate greyscale.
CIELAB uses the same Y. Sure they apply a nonlinear function to it, but if all you do is convert to CIELAB, remove chroma, then convert to sRGB you'll get an identical result.

The only real difference is what gamma function to use, but the one used here (or even just square/squareroot) should give results that are nigh impossible to tell apart from sRGB.

This ("lightness prediction") is one of the design criteria for the OKLAB color space, see: https://bottosson.github.io/posts/oklab/

The HSV color spectrum in the oklab article shows very clearly how the OKLAB lightness is a much better metric for whether a color is bright or not than HSV-value.

This article by comparison is very grayscale-focussed and concise, but gives less information on the physics behind it.

(comment deleted)