Skip to content

Figma plugin that helps you export color styles to Xcode assets

Notifications You must be signed in to change notification settings

WallabyStuff/Xcode-color-asset-exporter

Repository files navigation

Xcode-color-asset-exporter

This plugin automatically exports color styles to assets which can be adopted in Xcode project.
Also supports dark appearance colors 🌙.

NOTE: It doesn't support gradient colors like Xcode does.


Check out on Figma community



How to use?

1. Prepare for export
Rename your color styles with tag wrapped with brackets if you have a dark appearance color.
If you don't get the dark appearance color or if the color doesn't make a pair, this plugin will turn it into an universal asset.

NOTE: It doesn't matter what the tag name is, but the tag name has to be same as the others.

e.g

  • BackgroundColor [day]
  • BackgroundColor [night]

or

  • BackgroundColor [light]
  • BackgroundColor [dark]

2. Run the plugin in Figma
Fill out the tag names with your tag names or just leave them empty if you're using tag names by default [day], [night].


3. Create
Press create button to download colors.zip file


4. Use in Xcode
Unzip colors.zip file.
Drag and drop colors folder in your Xcode Assets tab or copy and paste in Assets.xcassets folder directly.


5. Enjoy your time ☕️
Boom! Now you're ready to use color assets in your Xcode Project


How it works?

Each folder includes Contents.json which contains folder information. And each YourColorName.colorset folder includes Contents.json which contains color information. So the Xcode could understand where the folder is and what the color is.


The is open sourced project.
Feel free to pull request 😉

About

Figma plugin that helps you export color styles to Xcode assets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages