What is this?
This plugin is intended to automate the process of adding colors to a document palette.
Since Sketch v53, Fill presets can now be named and viewed in list so in order to use that we'd have to add colors manually as well as name them one by one.
Well, this plugin automates that process, and as a bonus you can export the same colection of colors to a JSON file to share with developers. Right now this is very opinionated and suited to how our team at Mindera work.
- Install the plugin
- Make sure your layers follow the name structure:
- (if you have colors on document colors palette, you might want to run
Add selected colors to.. -> Reset Palette)
- select all color Layers you want to add to the palette, and run
Add selected colors to.. -> Document colors
- Repeat 4. but choose
to JSONto export the slected layers as a JSON list.
Thanks to @helloimbguedes for cleaning up the code and the initial structure.
Thanks to dkrape for the starting point of how to approach this.