helgasoft commented on issue #20757:
URL: https://github.com/apache/echarts/issues/20757#issuecomment-2682929381

   @uhafner, ECharts API says that 
[color](https://echarts.apache.org/en/option.html#color) could be defined by a 
**string** in three formats: 'rgb(255,0,0)', '#ff0000' or 'red'. So when you 
use ```color: "oklch(50% 0.2155 150deg)"``` ECharts considers it an invalid 
**string** and ignores it. I do not know if or when _oklch_ color format will 
be supported in ECharts.
   
   I made an effort in my Demo above to search, adapt, test and share a 
conversion **function** _ok2rgb_. It uses the **absolute** value syntax of 
_oklch_ to convert LCH values to color format 'rgb()' The [relative value 
syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) you 
are using ```oklch(from oklch(...)...)``` is not supported. But you are welcome 
to enhance _ok2rgb_ and make it work with relative syntax as well. And if you 
are successful, please share.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to