Function: fromDtcg()
function fromDtcg(tokens, opts?): RasdTheme;
Defined in: dtcg.ts:137
Reads a DTCG token document back into a RasdTheme.
Only the leaves Rasd knows are imported; unknown groups are ignored (a DTCG
file from Figma carries far more than a theme needs). Throws
RASD_THEME_INVALID when no id can be determined, since a theme without an
identity cannot be registered, cached or extended.
Parameters
| Parameter | Type |
|---|---|
tokens | DtcgDocument |
opts | FromDtcgOptions |