A Sketch plugin that imports color variables from CSS or JSON files into your Sketch document as Color Variables (Swatches).
- Download the latest release
- Unzip and double-click
ColorMagic.sketchpluginto install
- Open a Sketch document
- Go to Plugins → Color Magic → Import Colors...
- Select a
.cssor.jsonfile containing your colors - Colors are imported as Color Variables (Swatches)
:root {
--primary: #ff6600;
--secondary: rgba(51, 51, 51, 1);
--accent: #c0ffee;
}{
"primary": "#ff6600",
"brand": {
"accent": "#c0ffee",
"dark": "rgba(0, 0, 0, 0.8)"
}
}Nested JSON keys are joined with / separators (e.g., brand/accent).
- Hex:
#rgb,#rrggbb,#rrggbbaa - RGB:
rgb(255, 128, 0) - RGBA:
rgba(255, 128, 0, 0.5)
When importing colors that already exist in your document, you'll be prompted to:
- Update – Replace the existing color with the new value
- Skip – Keep the existing color unchanged
- Update All – Update this and all remaining duplicates
- Skip All – Skip this and all remaining duplicates
- Sketch 70 or later
MIT License - see LICENSE for details.
Freddie Harrison
