Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The color interpolation in 2D mode is bad. Instead of interpolating through RGB, you should use OKLCH

Demo: https://jsfiddle.net/t80eLfc2/2/

Interpolating in RGB just uses linear interpolation on each channel, so it ends up passing through grey in a lot of cases, and the colors look very desatured.

Interpolating in OKLCH preserves chroma and instead passes through different hues.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: