Giter Site home page Giter Site logo

andrewfiorillo / sketch-palettes Goto Github PK

View Code? Open in Web Editor NEW
2.3K 69.0 136.0 208 KB

A Sketch plugin for exporting and importing fill presets. It supports colors, gradients, and pattern fills.

License: MIT License

JavaScript 100.00%
sketch sketch-plugin sketch-app

sketch-palettes's Introduction

Sketch Palettes

A Sketch plugin for exporting and importing fill presets. It supports colors, gradients, and Pattern fills.

Installation

Move the Sketch Palettes plugin into your Plugins folder or double-click the .sketchplugin file.

Usage

Saving Palettes

You can save palettes from either the Global presets section or from the Document presets section of the color picker. You can also select which of the available fill types you'd like to include. The plugin supports colors, gradients, and pattern fills. Saving will create a .sketchpalette file at whatever location you choose.

Loading Palettes

Running the "Load Palette..." command in the plugin menu will allow you to choose a .sketchpalette file containg the presets you like to import. You can load palettes into either the Global presets section or into the Document presets section of the color picker. You can also select which of the available fill types you'd like to load. Fill presets will then be appended to the corresponding preset sections.

Removing Palettes

Select "Clear Palette..." to remove fill presets from either the Global presets or Document presets section of the color picker. You can select which fill types you'd like to clear.

Info & Feedback

This plugin would not have been possible without the help of some other awesome people. Alan Dickinson was enormously helpful and implemented the long-standing feature request to support gradients, as well as some other nice enhancements and bug fixes. William O'Beirne helped with some of the trickier parts earlier on, like making sense of the class-dump of Sketch, to figure out how to use undocumented Sketch functionality. And Ale Muñoz lent a hand fixing bugs here and there.

If you have any questions, find a bug, or have ideas for ways to improve the plugin, ping me on twitter: @andrewfiorillo

sketch-palettes's People

Contributors

alandickinson avatar andrewfiorillo avatar bomberstudios avatar guylepage3 avatar kyleweiner avatar mathieudutour avatar nktx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketch-palettes's Issues

Colors are not saved between sessions

When closing the Sketch document and reopening it, the color palette is reset to default and I have to reload the palette with my saved colors. I even recall the colors resetting during the same session.

Document Pallets will not be saved within the doc

Please fix this, this is crucial. So when i load a pallete it will not be saved with the document i have always to reimport the palette. Since Sketch 3.8.2 the document palettes sometimes dissapears.

Stopped working in Version 41.2 (35397)

It hasn't been moved to the "Deprecated" category by Sketch, but it doesn't actually load my palettes anymore :( I miss it dearly.

To clarify, I follow the same steps I always did: Sketch Palettes > Document Colors > Load palette... [choose my palette]

Before, it would add the colours to my file.

Now, it does nothing at all.

Not loading palette

I have had good luck with this plugin but I can't load a saved palette now for whatever reason. I can use other features like clear but not load.

Support multiple fill types

Plugin worjs amazingly well for colour palletes, would be great if it automatically linked up the "Document colours" pallette and the "Document Gradients" pallette for import and export.

"Load palette" not working

Save palette is working fine, but I cannot load a new palette. Selecting that option from the plugin menu does nothing, no dialogs open or anything.

I checked the Plugin Output.log and I see this:

ObjC method arrayWithObjects: requires 1 argument, but JavaScript passed 2 arguments «Plugin Output»

System details:
High Sierra 10.13.1
Sketch 48.2

Brand colors

I'd love it if there was some way to associate a palette with a set of brand colors. Change your brands primary color and see it update right across the Sketch file.

Can't load palettes

I am unable to load palettes in Sketch 48.2. I can clear and save palettes, but I am unable to load one. When I attempt to load one it seems to fail silently.

Global Colors

Ability to save and load into the Global Colors section of the color picker, as well as the Document Colors section.

Sketch 3.83 - Sketch Palettes file released June 16 cannot load any new palettes

Hi,

thank you so much for creating this plugin and being so responsive on twitter and github. I am using sketch version 3.83 on a mac 10.11.5 (both updated to latest versions) and the latest version of the plugin.

When I try to load a color palette into global or document colors using the plugin:

it opens a window to select a palette as expected, then when I select a palette (for example one of the 3 bundled palettes that you have in the github download) there is no feedback once I select the palette and it does not appear inside my color palettes.

Thanks again for your help, I have attached a screen recording video to take you through the process so that you can see for yourself.

ScreenRecording.zip

change load functionality

Currently, sketch-palettes, executes the following workflow when loading palettes.

You can load colors into either the Global Colors section of the color picker or into the Document Colors section. Selecting "Load Palette..." from either menu will prompt you to open a .sketchpalette file containing the colors you want to load. This will replace whatever colors are currently in the selected section.

Which is fine but I would like to make a suggestion to change...

This will replace whatever colors are currently in the selected section.

The reason being is that some clients have multiple palette sets.

Request:
It would be nice and, IMO a bit more intuitive, to execute the loading to only "add" to the current set instead of replacing the current set. If the user wants to replace, he/she would simply use the "clear" feature that is already built in.

Sketch 44.1 crashes when 'Clear palette' is used and then palette toggling happens

Hi there,

First off, sweet plugin - thank you :)

Secondly, I crashed Sketch today by doing the following on macos Sierra (up-to-date):

  • Sketch is open (with 2 files open)
  • Checkout today's repo into ~/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Sketch Palettes
  • Sketch successfully loads the newly available Plugin
  • I exported a Global-only palette from file 1
  • I imported that palette into file 2, success
  • I realise I should've selected 'Document' and I use the 'Clear pelette' menu option
  • I remove the Global palette, the colour palette panel does not reflect this change
  • I try to toggle visibility on the colour palette panel to a closed state, and I try to re-expand it, in an attempt to see if the app's state just needs a kick
  • BAM!

Actually I am not certain whether it was the expand or collapse action that crashed, but it was one of them.

Name colors

Hi,

It would really help us if we could name the colors in the palette.
I'd like to know if this is something you see as an enhancement too.

Thanks,
Bas

Error handling for loading unsupported file types

If you try to open an unsupported file type, like an mp3 or something, it should tell you to choose a more sensible file type. (come on, why are you trying to load an mp3 into the color picker? You're killing me here.)

Support Sketch 45 plugin update system

Hi there!

This is a quick note to remind you that Sketch 45 will include a plugin update system.

It would be awesome if you could add support to it (it's really easy!) before Sketch 45 comes out. Ideally, you should release an update for your plugin while we're still in Sketch 44, so your users will have a nice & easy experience when 45 is released.

For more details, please check http://sketchplugins.com/d/229-updating-plugins and http://developer.sketchapp.com/introduction/updating-plugins/

Thanks in advance!

Create palette from list of Hex codes

It would awesome if there was a command for "Create Palette". You could provide an input dialog and ask the user to enter in the hex colors (comma separated) and then load those into the document colors. You can manually do this by modifying the exported .sketchpalette file but having this built-in would take it to the next level.

Support transparent colors

Right now the plugin only supports hex colors, but it should support rgba colors as well, so transparency can be saved. Perhaps consider changing the storage format entirely to rgba. It would also need to maintain compatibility for palettes saved before rgba support.

No .sketchplugin file

In the installation README, it mentions the following:

"Move the Sketch Palettes plugin into your Plugins folder or double-click the .sketchplugin file."

However, when I browse the code, I cannot find the .sketchplugin file. Is it missing or am I looking in the wrong place?

Thanks for your incredible work.

Large sketchpalette will not scroll

I have a rather large palette and the view will not let me scroll past the initial view port. It will peak and snap back (just like when you reach the bottom of a page on Safari). I'm using Sketch 39.1.

.sketchpalette file not saving

I am trying to save a document color palette. It shows the save menu, I enter a name to save the file but the template is not getting saved. When I go to the folder and check, I see there is no palette saved.

Palette from Selection

I'm really liking the plugin! Palettes is a feature I was really missing in Sketch. I think it would be a good idea to generate a palette from a specific selection. That way if you're trying out a lot of different color schemes, you can selectively generate multiple palettes from the same page.

Document colors not being remembered since new update

Since the new Sketch 3.5 update, the document and global palettes can be changed but when I save and close the document, the palettes revert back to their original state.

I've also tried clearing palettes and saving the documents but to no avail.

feature request: name colors

So I've been thinking about this for a while now.. It would be super nice to be able to name my colors in sketch-palettes. Would save me quite a bit of time.

Support .clr files

Importing the standard Apple .clr palettes worked one time for me. It was the first thing I tried. After that it didn't work anymore, weather in the document section nor in the global section. Is there any way I can troubleshoot this or give you additional information?

Running OS X 10.10.5 (14F27) and Sketch 3.3.3 (12081) here.

Importing a .sketchpalette works great by the way, also clearing palettes.

Sketch Palettes not working on Sketch 46.1

The plugin is no longer working on this version of Sketch. Clicking Load Palette does nothing. I tried re-installing everything but still, i can't load any palette since no Browse windows pop up.

Thank you,
Pedro

Updatable Colors

I have long longed for a way start out with some palette and iterate on it while designing. To immediately see the effects of a color change in the overall design, allowing for more refined color choices and also for defining color themes. Similar to the way css variables work, or how print design applications works (Adobe now calls it global-colors). I’d love to help!

Not working on Version 3.8.2

Hi there,
I have an issue with the plugin. I receive an error message saying "no colors in palette"
I let you check the screenshots below. Any thoughts on what it could be?
Cheers,
Amandine

screen-shot-2016-07-21-at-17 39 54
screen-shot-2016-07-21-at-17 39 55

Crash when clearing color palette

Steps

  1. Install the latest Sketch Palettes version
  2. Create a new document, draw a Rectangle
  3. download and unzip this file: crash.sketchpalette.zip
  4. Menu › Plugins › Sketch Palettes › Global Palettes › Load Palette... › find and load the palette file from previous point
  5. select the Rectangle and open its Fill Color popover
  6. expand the Global Colors (if it's not expanded already)
  7. Menu › Plugins › Sketch Palettes › Global Palettes › Clear Palette
  8. Collapse the Global Colors and expand them again = crash

Support transparency

Great plugin (we've used it at Keybase!), but it looks like it doesn't support swatches with transparency.

Crash when clearing palette while viewing color

If you navigate to the color picker in Sketch, have a color selected, and then clear the palette, it causes Sketch to crash.

Exception Type: SIGABRT
Exception Codes: #0 at 0x7fff84a6bf06
Crashed Thread: 0

Application Specific Information:
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray'

Freezes every time I try to load a palette

I'm running Sketch Version 3.5.2 (25235) on OS X El Capitan 10.11.3 (15D21) with the latest version of Sketch Palettes.

Every time I try to load a palette it opens the finder window, but freezes before populating the finder window.

Can't load palettes on Sketch 47

Came across this plugin recently and found an issue with loading palettes. Clearing and saving the palette works but when trying to load that same saved palette back in it fails. I repro'd 47 and 47.1 and both have this issue. I tried it out on 46.2 and loading back in works so it seems they have yet again changed some palette code. 😞

Issues Saving Document Palettes

I'm not sure if this is widespread, but I've been having issues saving document palettes. Specifically, I flat out can't.

I'm on Version 39.1 (31720) of Sketch. If you need any other info feel free to let me know.

Sketch 3.4 issues

Everytime i try to load my palette nothing appears in my palette... could this be an issue with the recent update?

Love this plugin, btw!

Saving doesn't work in Sketch 45.1

Saving a palette from document colors does not bring up the saving dialog. From the global colors menu it does but no palette file is saved in both cases.
schermafbeelding 2017-07-06 om 11 27 03

Importing multiple palettes

First, thank you for making the plugin. It’s very useful and I’m using it all the time to manage color schemes in Sketch.

I wanted to separate all the Material Design colors into their own respective .sketchpalete files so that I could select only the colors I need for each project (e.g. material-design-red.sketchpalette, material-design-pink.sketchpalette, etc.), rather than having all of the Material colors at once.

However, it seems when I load a palette it overwrites the previous one. It seems it replaces the current palette with the new one. Is this a bug or just a use case that the plugin doesn’t handle?

Unable to load palette

Sketch Version 48.2
Plugin is updated to version 2.0
macOS High Sierra version 10.13.2

I am able to "Save" a palette and "Clear" a palette but unable to "Load" an existing palette. When I select "Load Palette" absolutely nothing happens. I have tested the option to save and clear and both are working just fine.

I love this plugin! Thank you for creating it. :) It was working like a champ. I think it's related to updating Sketch?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.