{"id":16429888,"url":"https://github.com/miguelsolorio/figma-variables-generator","last_synced_at":"2025-04-25T00:32:53.065Z","repository":{"id":213586717,"uuid":"734460918","full_name":"miguelsolorio/figma-variables-generator","owner":"miguelsolorio","description":"A Figma plugin for generating local variables using JSON","archived":false,"fork":false,"pushed_at":"2024-01-06T01:17:02.000Z","size":12613,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T06:51:31.827Z","etag":null,"topics":["figma","figma-plugin","figma-variables","variables"],"latest_commit_sha":null,"homepage":"https://www.figma.com/community/plugin/1319728928151105267","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelsolorio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-21T18:32:33.000Z","updated_at":"2024-08-28T13:28:38.000Z","dependencies_parsed_at":"2023-12-21T20:22:52.088Z","dependency_job_id":"68e7c1ea-8b52-4af3-8106-4628079dfabd","html_url":"https://github.com/miguelsolorio/figma-variables-generator","commit_stats":null,"previous_names":["miguelsolorio/figma-variables-builder","miguelsolorio/figma-variables-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelsolorio%2Ffigma-variables-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelsolorio%2Ffigma-variables-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelsolorio%2Ffigma-variables-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelsolorio%2Ffigma-variables-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelsolorio","download_url":"https://codeload.github.com/miguelsolorio/figma-variables-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250733569,"owners_count":21478394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["figma","figma-plugin","figma-variables","variables"],"created_at":"2024-10-11T08:24:49.794Z","updated_at":"2025-04-25T00:32:52.554Z","avatar_url":"https://github.com/miguelsolorio.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Figma Variables Generator\n\n![Cover](https://github.com/miguelsolorio/figma-variables-generator/blob/main/assets/cover.png?raw=true)\n\nA [Figma plugin](https://www.figma.com/community/plugin/1319728928151105267) for generating local variables using JSON\n\n## Demo\n\n[![Demo video](https://github.com/miguelsolorio/figma-variables-generator/blob/main/assets/demo.png?raw=true)](https://www.youtube.com/watch?v=WiIIBhDmom0)\n\n## How to use\n\nUse the format below and always include a mode for each variable. Colors must be in a hex format and can support alpha channels via 8 digits.\n\n### Single Mode\n\n```json\n{\n  \"$VariableName\": \"$Hex\",\n  \"$VariableName\": \"$Hex\",\n  \"$VariableName\": \"$Hex\"\n}\n```\n\n### Multiple Modes\n\n```json\n{\n  \"$VariableName\": {\n    \"$Mode\": \"$Hex\",\n    \"$Mode\": \"$Hex\"\n  },\n  \"$VariableName\": {\n    \"$Mode\": \"$Hex\",\n    \"$Mode\": \"$Hex\"\n  },\n  \"$VariableName\": {\n    \"$Mode\": \"$Hex\",\n    \"$Mode\": \"$Hex\"\n  }\n}\n```\n\n### Aliasing\n\nYou can use aliasing across your local variables as long as their names are unique.\n\n```json\n{\n  \"$VariableName\": \"$VariableAlias\",\n  \"$VariableName\": \"$VariableAlias\",\n  \"$VariableName\": \"$VariableAlias\"\n}\n```\n\n- `$VariableName` is the name of your variable and must be unique in the collection\n- `$VariableAlias` is the name of the alias you are aliasing, be sure to include the `$` to enable aliasing\n- `$Mode` is the name of your mode, each variable must contain the same modes\n- `$Hex` is the hex code of your color, supports 8-digit hex codes for transparency\n\n### Examples\n\nSingle mode that creates a color palette:\n\n```json\n{\n  \"black\": \"#0e1112\",\n  \"white\": \"#d4d7d6\",\n  \"grey\": \"#4d5a5e\",\n  \"blue\": \"#519aba\",\n  \"green\": \"#8dc149\",\n  \"orange\": \"#e37933\",\n  \"pink\": \"#f55385\",\n  \"purple\": \"#a074c4\",\n  \"red\": \"#cc3e44\",\n  \"steel\": \"#7494a3\",\n  \"yellow\": \"#cbcb41\"\n}\n```\n\nMultiple modes that use 8-digit hex codes:\n\n```json\n{\n  \"tab-activeBackground\": {\n    \"Dark\": \"#1f1f1f\",\n    \"Light\": \"#ffffff\",\n    \"Monokai\": \"#272822\"\n  },\n  \"tab-activeBorder\": {\n    \"Dark\": \"#1f1f1f\",\n    \"Light\": \"#f8f8f8\",\n    \"Monokai\": \"#00000000\"\n  },\n  \"tab-activeBorderTop\": {\n    \"Dark\": \"#0078d4\",\n    \"Light\": \"#005fb8\",\n    \"Monokai\": \"#00000000\"\n  },\n  \"tab-activeForeground\": {\n    \"Dark\": \"#ffffff\",\n    \"Light\": \"#3b3b3b\",\n    \"Monokai\": \"#ffffff\"\n  },\n  \"tab-border\": {\n    \"Dark\": \"#2b2b2b\",\n    \"Light\": \"#e5e5e5\",\n    \"Monokai\": \"#1e1f1c\"\n  }\n}\n```\n\nUsing aliasing across collections:\n\n`Colors` collection:\n\n```json\n{\n  \"black\": \"#0e1112\",\n  \"white\": \"#d4d7d6\",\n  \"grey\": \"#4d5a5e\"\n}\n```\n\n`Tokens` collection that references `Colors` variables:\n\n```json\n{\n  \"button\": {\n    \"Dark\": \"$black\",\n    \"Light\": \"$white\",\n    \"Monokai\": \"$grey\"\n  }\n}\n```\n\n## Run Plugin Locally\n\n1. Clone this repository\n2. Install dependencies with `npm install`\n3. Build the plugin with `npm run build` or `npm run watch`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelsolorio%2Ffigma-variables-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelsolorio%2Ffigma-variables-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelsolorio%2Ffigma-variables-generator/lists"}