leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.48k stars 370 forks source link

Support for oklch colors #927

Closed alexey-milovidov closed 2 months ago

alexey-milovidov commented 2 months ago

https://oklch.com/

They are already supported in most browsers in CSS, and maybe supported on Canvas, but when I tried to use them for uPlot, it did not work.

Motivation: https://github.com/ClickHouse/ClickHouse/pull/60391

leeoniya commented 2 months ago

hmm, uPlot just passes the color strings straight to dom and canvas context. i dont recall having any kind of color parsing/processing 🤔

leeoniya commented 2 months ago

works okay: https://jsfiddle.net/bycp0efm/

alexey-milovidov commented 2 months ago

Thank you, this makes me confused - I will check again.

alexey-milovidov commented 2 months ago

My mistake. Everything works.