This tool helps:
-
Use Figma API to fetch colors data
Styles library should be published to enable API usage
-
Rearrange it in case you have light/dark mode values
-
Generate swift file from fetched data
-
Print out added, deleted, and renamed tokens using
key
parameter to compare
- Start with adding all required values
- Compile script with
./buildGenerator.sh
- Execute
./PaletteGenerator
Uses public Figma API to collect data from the styles library and prepare reusable JSON. Details here

This stage generates Swift file with color values enum using Stencil. It takes data from Figma API fetcher output JSON.
You can check templates for generator here
