How to find nodes that use a text or colour style

Hi, I want to search and return nodes on the current page where it uses a given text or color style in any way i.e. as a background fill, stroke, text color or font.

AFAIK, I can use fillStyleId to check if a layer’s background is using a color style. In that case, what other node attributes can I use to check for stroke, font and the rest?

The Figma Developers website has a search engine.

If you already have a style, you can use the consumers property on the style: BaseStyle | Plugin API, which will give you all the nodes and the fields where the style is applied.