Can a Figma plugin access the currently selected Fill Styles?

Hey there, I’d like to create a plugin to allow me to quickly generate a new saved linear gradient fill style (or Paint Style) from two or more previously-saved solid fill styles. The user would be able to select one or more saved fill styles from the right sidebar like this:

then run my plugin and have a new saved style called something like “Fruit / 100-400” with a gradient between those two colors that they could now adjust.

However, I can’t seem to find any way to access those selected styles; they don’t appear to be available under figma.currentPage.selction as I would’ve expected.

Just thought I’d ask if this plugin is possible, or if there isn’t a way to directly access those selected styles via API. Cheers!

Figma does not currently have an API for getting the selected styles in the properties panel.


Okay no worries, thanks @tank666!