ITADN

interpolation example not respecting interpolationSpace OKLCH

#18Openleeoniya 创建于 2025-09-25
L
leeoniyacommented
hey @mattdesl using the code in [example-interpolation.js](https://github.com/texel-org/color/blob/be0100ec6626d31d930aba3d5f2e96872f5f6782/test/example-interpolation.js#L30) with a blue to white ramp in the OKLCH results in rgb interpolation that exhibits the classic lerp through purple: ```js const A = { space: sRGB, coords: [0, 0, 1], }; const B = { space: sRGB, coords: [1, 1, 1], }; ``` <img width="304" height="117" alt="Image" src="https://github.com/user-attachments/assets/e2cfbb9f-6286-4718-90d3-09c527e9cff8" /> i was expecting something like this (from https://bottosson.github.io/posts/oklab/): <img width="349" height="160" alt="Image" src="https://github.com/user-attachments/assets/d3b07ad7-07ef-4eda-ac26-1c3df7ac6775" /> code looks like it should be working, can't see any obvious bug / typos.
3 条评论