getDocumentThemes
info
This API is only available in Figma Slides
Returns all Themes in the current document.
Each theme contains references to its color variables and text/grid styles, which can be resolved using the existing Variables and Styles APIs.
Signature
getDocumentThemes(): Theme[]
Remarks
const themes = figma.getDocumentThemes()
for (const theme of themes) {
console.log(theme.name)
const collection = await figma.variables.getVariableCollectionByIdAsync(theme.variableCollectionId)
// Access theme colors via collection
}