Skip to content

Update color processing library to handle modern CSS color syntax #7523

@camdecoster

Description

@camdecoster

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

Metadata

Metadata

Assignees

Labels

P2considered for next cycle

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions