andrewfiorillo / sketch-palettes

A Sketch plugin for exporting and importing fill presets. It supports colors, gradients, and pattern fills.
MIT License
2.27k stars 134 forks source link

Support .clr files #7

Closed patrickwelker closed 8 years ago

patrickwelker commented 9 years ago

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.

andrewfiorillo commented 9 years ago

Wow. I never built any functionality to support .clr files, so I'm really surprised they could have ever worked with the plugin. I'm using a simple JSON format, but It looks like .clr files are binary. If you can reproduce being able to successfully load a .clr, I'd be really interested in seeing how it worked.

patrickwelker commented 9 years ago

@andrewfiorillo Ahhh… I see. I guess in the colors from the palette I imported were already in my global palette and I thought the import worked. Makes sense… this is probably what happened.

Aside from that misunderstanding: If importing from the native color picker would be possible this would be a game changer for me. I have all my colors in that thing and it has a ton of plugins which makes it really useful. #featurerequest

HeidiHansen commented 7 years ago

Bummer, this consumes a lot of time for iOS developers since we have to hard code calculated hex values into rgb values. If sketch supported exporting a clr file, we would be able to version control it so the devs wouldn't need to ask the designers for colors anymore!

odbol commented 6 years ago

I also have interest in this; I could take a shot at developing it. Seems pretty straightforward using these resources:

https://developer.apple.com/documentation/appkit/nscolorlist/1522127-availablecolorlists?language=objc http://developer.sketchapp.com/guides/cocoascript/

If I create a patch, will you accept it?

andrewfiorillo commented 6 years ago

I actually got importing .clr files working a while back when I was exploring different file formats. Though it’s quite unfinished and most likely not functional at the moment.

I think simply supporting importing could be pretty doable. Is that what you were imagining?

odbol commented 6 years ago
Yeah importing would solve my main use case, (and perhaps
  exporting probably wouldn't be much more work after that). Let me
  know what I can do to help :)

On 3/7/18 7:48 PM, Andrew Fiorillo
  wrote:

  I actually got importing .clr files working a while back when I
    was exploring different file formats. Though it’s quite
    unfinished and most likely not functional at the moment.
  I think simply supporting importing could be pretty doable. Is
    that what you were imagining?
  —
    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub, or mute the thread.

  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/andrewfiorillo/sketch-palettes","title":"andrewfiorillo/sketch-palettes","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/andrewfiorillo/sketch-palettes"}},"updates":{"snippets":[{"icon":"PERSON","message":"@andrewfiorillo in #7: I actually got importing .clr files working a while back when I was exploring different file formats. Though it’s quite unfinished and most likely not functional at the moment.\r\n\r\nI think simply supporting importing could be pretty doable. Is that what you were imagining?"}],"action":{"name":"View Issue","url":"https://github.com/andrewfiorillo/sketch-palettes/issues/7#issuecomment-371369849"}}}

-- 

Tyler Freeman

http://odbol.com