All Projects → ment-mx → Prism

ment-mx / Prism

Licence: mit
Creates a beautiful artboard color palette with all your 'Document Colors' and their respective color label in a variety of formats.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Prism

Sketch Better Android Export
Stars: ✭ 61 (-94.06%)
Mutual labels:  sketch-plugin, design, sketch
Symbol Spacer Sketch Plugin
automatically trigger Sketch’s “reset to original size” function when deselecting symbol
Stars: ✭ 86 (-91.63%)
Mutual labels:  sketch-plugin, design, sketch
Import Colors Sketch
Import colors from macOS CLR, Photoshop ACO/ACT, Illustrator ASE, GIMP GPL, Sketch, Text file to Sketch color variables.
Stars: ✭ 32 (-96.88%)
Mutual labels:  sketch-plugin, sketch, palette
Sketch swatches
A swatches plugin for Sketch.
Stars: ✭ 446 (-56.57%)
Mutual labels:  sketch-plugin, sketch, palette
Sketch Copy Paste Shadows
Copy & paste only shadow styles from layers without others styles getting in the way.
Stars: ✭ 38 (-96.3%)
Mutual labels:  sketch-plugin, design, sketch
Html Sketchapp Cli
Quickly generate Sketch libraries from HTML documents and living style guides, powered by html-sketchapp
Stars: ✭ 631 (-38.56%)
Mutual labels:  sketch-plugin, design, sketch
Renamer
Sketch Plugin to rename multiple selected layers or groups or artboards at once
Stars: ✭ 16 (-98.44%)
Mutual labels:  sketch-plugin, sketch
Skpm
💎📦 A utility to build and publish Sketch plugins
Stars: ✭ 890 (-13.34%)
Mutual labels:  sketch-plugin, sketch
Sprite
Sketch 3 Plugin that makes SpriteSheets for game developers to export or use
Stars: ✭ 23 (-97.76%)
Mutual labels:  sketch-plugin, sketch
Automate Sketch
Make your workflow more efficient.
Stars: ✭ 856 (-16.65%)
Mutual labels:  sketch-plugin, sketch
Sketchapi
The JavaScript plugin library embedded in Sketch
Stars: ✭ 784 (-23.66%)
Mutual labels:  sketch-plugin, sketch
Sketch Toggle Constrain Proportions
Toggle the constrain proportions setting with your own configurable keyboard shortcut.
Stars: ✭ 9 (-99.12%)
Mutual labels:  sketch-plugin, sketch
Date Time Sketchplugin
Sketch data plugin generating random dates and times
Stars: ✭ 45 (-95.62%)
Mutual labels:  sketch-plugin, sketch
Carbon Design Kit
A versioned, comprehensive kit of the Carbon Design System visual assets (components, iconography, color palettes, grids, templates).
Stars: ✭ 985 (-4.09%)
Mutual labels:  design, sketch
Symbol Organizer
Organize your symbols page alphabetically (including layer list) and into groupings determined by your symbol names.
Stars: ✭ 835 (-18.7%)
Mutual labels:  sketch-plugin, sketch
Sketch Chat
A Sketch plugin to chat in Sketch Cloud files
Stars: ✭ 20 (-98.05%)
Mutual labels:  sketch-plugin, sketch
Sketch Commands
A collection of script commands for Sketch.app
Stars: ✭ 826 (-19.57%)
Mutual labels:  sketch-plugin, sketch
Sketch Web Viewer
View and inspect Sketch 43 files in browser
Stars: ✭ 853 (-16.94%)
Mutual labels:  design, sketch
Sketch Icons
🚀 Generate a dynamic icon library
Stars: ✭ 878 (-14.51%)
Mutual labels:  sketch-plugin, sketch
Sketch Resize Commands
A Sketch plugin that lets you resize and reposition objects by using simple arithmetic commands, like `b+20,lr+20`. Multiple objects are supported.
Stars: ✭ 32 (-96.88%)
Mutual labels:  sketch-plugin, sketch

| 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. 😎


Features

  • Beautiful color palette generation.
  • Automatic color naming.
  • Fully customizable.
  • Export as code in a variety of formats (CSS, SASS variables, Swift, etc).
  • Color renaming (Alias).
  • Rebuilt from the ground up using Coffeescript and love.

Usage

  1. Install plugin.
  2. Add your colors to your Document Colors.
  3. Run command [ctrl cmd c].
  4. Voilà!

Changing a Color Alias

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.

Exporting Colors as Code

  1. Select the colors you want to export (optional)
  2. Click Export Selected Colors [ctrl cmd s] or Export All Colors [ctrl cmd e]
  3. Select the format to export.
  4. Save your color code file or copy the colors to clipboard.

Customization

Under the Prism menu, there's an option called **Show Template File...** that opens the Template.sketch file located under the Prism.sketchplugin package, this file contains all the layers that are used as templates and are later copied over to your palette.

Changing Palette Template

The template file is a normal sketch file that has multiple pages, each page with its own cell Template, you can add or remove all the pages you want to manage your own templates, to select the style you want just open the file and save it on the page your desired template is. Now just generate your palette to see the changes.

Editing Template

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:

  • Your template page must have only one artboard layer that is exactly named 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.
  • Your template must have a layer group named exactly 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 ;)
  • Inside the 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.
  • Inside the 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.
  • Prism uses the name of the text layers to format the color of the cell, for example: if there's a text layer named "RGBA_CSS", prism will try set the layer's text value to the specified format.

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.

Adding Format

  1. Create a new formatter Coffeescript file inside src/formats
  2. Create a subclass of FormatterBase for your new formatter class.
  3. Overrides some methods defined in FormatterBase.coffee.
    • id and name are required to override.
    • If you plan to one text based format file like HexFormatter, then
      • formatText and format required to override.
    • If you plan to one binary format file like CLRFormatter, then
      • You need to override supportClipboard to returnfalse
      • You need to override exportAsFile.
    • If you plan to export several files like ColorSetFormatter, then
      • You need to override type to return EXPORT_TYPE_FILES

See FormatterBase.coffee for details.

Contribute

The best way to get things done is by doing them yourself, if you want to specify a format or a add a new feature or fix a bug, just submit a pull request!

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

What's next

  • Gradients support
  • Better template selection

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].