Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.26 KB

README.md

File metadata and controls

33 lines (21 loc) · 1.26 KB

PaletteGenerator

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

    image

Quick Start

  • Start with adding all required values
  • Compile script with ./buildGenerator.sh
  • Execute ./PaletteGenerator

Figma API fetcher

Uses public Figma API to collect data from the styles library and prepare reusable JSON. Details here

image

Swift CodeGen

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

image