Creates a beautiful artboard color palette with all your 'Document Colors' and their respective color label in a variety of formats.
| Download | Features | Usage | Customization | Changelog | Next | Contribute | Credits |
(Formerly ShareableColorPalette)
Creates a beautiful artboard with all the colors in your Document Colors
with its respective color label in a variety of formats. (Sketch 41)
Important: Make sure to download version 1.0.3 or higher to use Sketch 45 plugin auto updates. 😎
Coffeescript
and love.
To change the color alias, just change the text on the Name layer. If you want the default color name, just delete the text on that same layer.
Export Selected Colors
[ctrl cmd s] or Export All Colors
[ctrl cmd e]
Prism offers a lot of freedom to let you customize your own templates, however, in order for your template to play nicely with Prism you just have a few restrictions:
Prism Palette
, users can then change the name of the artboard once the palette is generated in their sketch files. Your cell doesn't have to be inside this artboard, but it would be good practice, as future releases may use this cell-inside-artboard to specify the spacing between cells.Cell
, everything that your cell includes must be inside this group, you can then go ahead and add as many groups as you like inside of it ;)Cell
group there must be a layer named exactly Color
, it must have at least one solid Fill and this fill must be on the bottom of all the other fills, this layer is the one that Prism uses to display the real color.Cell
group there must be a text layer named exactly Name
(lol), this is the layer that Prism uses to display the automatic name and can be edited to add or remove aliases.You can have as many text layers for formats as you want. Also, layers can be locked or invisible as long as they conform to this restrictions.
If you wanna dive deeper on this process, you should check out the Cell.coffee
and Template.coffee
files.
src/formats
FormatterBase
for your new formatter class.FormatterBase.coffee
.
id
and name
are required to override.HexFormatter
, then
formatText
and format
required to override.CLRFormatter
, then
supportClipboard
to return false
exportAsFile
.ColorSetFormatter
, then
type
to return EXPORT_TYPE_FILES
See FormatterBase.coffee
for details.
I have included a compile.sh
file that automatically compiles all the files inside the src/
folder into the build/
folder, however, if you add new files you must import them in the right order inside the Prism.cocoascript
file.
You will need coffescript v1 for the plugin to work as v1 compiles to EC5 syntax accepted by cocoascript
You can easily install it with npm by running this:
npm install --global [email protected]
You can then run the compile.sh
file by typing this in the terminal inside the Prism.sketchplugin/Content/Sketch
folder:
./compile.sh