Plugin API to convert gradient paint styles to CSS

Hello, I made a plugin called Color Import / Export.

Currently, it only handles Solid paint styles but I have received requests to add support for Gradient paint styles.

By looking at the GradientPaintStyle interface, there will be a lot of work and complexity in re-engineering how you convert these to CSS for the “Inspect” feature of Figma. A lot of that comes from converting the transform matrix into color stops and angles.

I am wondering if this API could be exposed to the plugin developers so we do not have to re-invent what is already done by Figma, but could use that functionality in new ways (such as for my plugin :slight_smile:).

Thank you.