This project creates figma variables using PyautoGUI and a .txt file with your CSS variables. For now it only works with color variables, separating light from dark theme colors. It's highly recommended to use Realtime Colors since this project was originally made to handle how THEY export css variables. If you want to make your own, follow this format:
:root[data-theme="light"] {
--variable-01: #fff;
...
}
:root[data-theme="dark"] {
--variable-01: #000;
...
}
- Clone the project
git clone https://github.com/Dedo-Finger2/create-figma-variables-python.git
- Install the dependencies
pip install -r requirements.txt
- Change the variables inside the variables.txt to match your own
- Run the main.py file
- Create two collections: "Light" and "Dark" and leave the variables popover's sidebar open just like its shown in this project cover
- Close the variables popover
- Confirm/Close the python popover and leave the script to execute it's magic
If you're using KDE Plasma with Wayland, switch to X11 and try again.