|
|
|
|
|
by mattdesl
456 days ago
|
|
It might be worth using a lightness estimate like OKLab, OKLrab[1], or CIE Lab instead of the RGB luminance weighting, as it should produce a more perceptually accurate result. The other issue with your code right now, is that it is using euclidean distance in RGB space to choose the nearest color, but it would be probably also more accurate to use a perceptual color difference metric, a very simple choice is euclidean distance on OKLab colors. I think dithering is a pretty interesting area of exploration, especially as a lot of the popular dithering algorithms are quite old and optimized for ancient compute requirements. It would be nice to see some dithering that isn't using 8-bits for errors, is based on perceptual accuracy, and perhaps uses something like a neural net to diffuse things in the best way possible. [1] https://bottosson.github.io/posts/colorpicker/ |
|
[1]: https://juliagraphics.github.io/Colors.jl/stable/colordiffer...
[2]: https://github.com/JuliaImages/DitherPunk.jl
[3]: https://juliaimages.org/DitherPunk.jl/stable/#Dithering-with...