Create color variables by importing JSON color palettes.
This plugin will add all the colors from the JSON and create color variables out of them to be used inside your project.
If you want to create Shared Styles instead of Color Variables, use version 1.1.2.
{
PALETTE_NAME: {
COLOR_LABEL: COLOR_HEX,
...
},
...
}
You can use Material Design Palette Generator to generate accessible color palettes and export them in JSON that will work with this plugin without any modifications.
Another tool generating a JSON file that work out-of-box is Open Color Tools
You can also use ColorBox by Lyft Design to generate a color palette, but it will require slight modification to the JSON code to make it work with the plugin.
Even though generated color shapes display that they are linked to the color variables, they are not. Apparently this is an issues with the Sketch API.
If you have any problem with importing JSON code, try to validate it first and then format/prettify it. For validation and formatting you can use any available online tool, such as https://jsonformatter.org/
- Check if JSON format is correct
- Check if any artboard already exisits inside page and create new artboards after them
- Support any JSON format?
MIT