A tool for creating motli palette from sketch files.
You only need to provide two arguments (order matters):
- Path to a specially formed sketch file with a color palette;
- Path to a file where parsed palette will be stored (for further using with motli).
For example:
java -jar motli-sketch-palette.jar /Users/test/palett.sketch /Users/test/palette.json
First of all take a look to the sample palette built with Sketch:
There are two themes left and right with 3 colors each.
Theme is represented with the vertical rectangle. The name of the rectangle MUST ends with "_theme" suffix (without quotes). In the example above left theme is called "left_theme" and right theme - "right_theme".
Color within theme is represented with the rectangle placed RIGHT INSIDE theme rectangle. The name of the rectangle MUST be written in snake-case and starts with hashtag sign. motli will transform color names to lowerCamelCase later.
You may find test-palette.sketch file with palette described above.
motli-sketch-palette tries to find shapes with names ending with "_theme" and considers them as theme-shapes. Then tries to find shapes that placed completely inside theme-shapes and considers them as colors of corresponding theme.
Copyright (c) 2019 Mail.Ru IM
Licensed under the MIT License.