Skip to content

Instantly share code, notes, and snippets.

@zlwaterfield
zlwaterfield / convert-figma-variables-to-tailwind-config.py
Created February 19, 2024 16:22
Convert Figma variable export to Tailwind color config
# Export from https://www.figma.com/community/plugin/1256972111705530093/export-import-variables
import json
app_name = "{fill_in}" # Make sure to replace this.
def rgba_to_string(rgba):
"""Convert RGBA color values to an RGBA string."""
r = int(rgba['r'] * 255)
g = int(rgba['g'] * 255)