plotly/plotly.js

Update color processing library to handle modern CSS color syntax

Opened this issue · 0 comments

Description

The current color processing library, TinyColor, can't handle modern CSS color syntax specifiers. We need to switch to a different library that can handle these specifiers.

Related to plotly/plotly.py#4824.

Steps to reproduce

  • Edit a test mock from the repo to use a modern color specifier. This represents a saturated sRGB red that is 50% opaque: rgb(100% 0% 0% / 50%)
  • Load the mock in Plotly DevTools
  • Note that the color has no opacity
  • You can also test color strings on the TinyColor test site
    Image

Notes

  • Another MIT-licensed library named color seems to be a good option for a replacement