Skip to content
Color2Code

Color2Code

by Burak

Export color variables into iOS & Android code format or Xcode Color Assets

FreeFigmaDev Mode

Installs

389

Likes

62

Users

7,473

Views

4,986

Preview

Color2Code preview

About this plugin

This plugin exports color variables into iOS & Android code format and also exports as Xcode Color Assets.Features------------------------------------------Exports iOS code formatExports Xcode Color assetsExports Android code format (Compose & XML)Supports variable mode (Light/Dark & High Contrast modes)Customize exported variable nameWorks in Dev Mode⚠️ Important Note------------------------------------------Before exporting color assets;You should rename your modes' names to "Light" and "Dark."The names for the high contrast modes should be "Light High Contrast" and "Dark High Contrast."Variableprimary-color: #18B968;Output for iOSlet primaryColor: UIColor = UIColor(UIColor(red: 24, green: 185, blue: 104))Output for Android Composeval primaryColor = Color(0xff18b968)Output for Android XML#ff18b968How to useLaunch the pluginSelect your collectionHit the “Generate” buttonCopy code formatExporting Xcode Color AssetsEnable "Export Xcode Color Assets" optionHit the “Generate” buttonDownload fileName_Colors.zip fileDrag and drop the folders in Xcode's Assets.xcassetsCustomizationRemove group names: Removes group name from the variable name.Camel case naming: Removes space, dash, and underscore from the variable name.Ignore hierarchy: Available for exporting Xcode color assets. Ignores group hierarchy and creates color assets at the same level. If you have variables with the same name, this will export only one of them!Color Space: Available for exporting Xcode color assets. Display P3, sRGB, Extended Range sRGB, and Extended Range Linear sRGB options are supported.Input Method: Available for exporting Xcode color assets. Floating Point (0.0-0.1), 8-bit (0-255), and 8-bit Hexadecimal formats are supported.Any Appearance: Available for exporting Xcode color assets.------------------------------------------For supportBuy me a coffee------------------------------------------

More software development plugins

View all