Sublime Forum

Color Picker plugin

#1

UPDATE: Now with windows support!

source and installation details can be found at:
github.com/weslly/ColorPicker

0 Likes

Sublime Text 2 vs WeBuilder
#2

This is pretty awesome. Thanks.

0 Likes

#3

Could you please make it work on Windows too? I tried to modify the script, but failed. I would be very grateful if you do it! Thanks :smile:

0 Likes

#4

It works if you install python and pygtk for windows

http://k.minus.com/jbbbcJzvzd7a1Z.png

it still have lots of bugs (on windows) and I personally don’t think it would be a good idea to install python + pygtk just to make it work (I tried to convert it using py2exe but the final .exe with all dlls and libs takes around 25mb, which is so big for a small color picker app) :frowning:

btw, try this one:
Color picker - color insertion :smile:

0 Likes

#5

Thank you weslly! Really appreciate it!

0 Likes

#6

Thanks for developing this plugin (thats one of the things I missed the most from Komodo Edit). How do you make it work under Windows? I have installed Python 2.64 and pygtk, I’ve added to my keybindings:

{ "keys": "ctrl+shift+c"], "command": "color_pick" }

but when I press this combination when hex value is selected nothing happens…

0 Likes

#7

I know you say its linux only, but can this work on a Mac?

0 Likes

#8

[quote=“chodorowicz”]Thanks for developing this plugin (thats one of the things I missed the most from Komodo Edit). How do you make it work under Windows? I have installed Python 2.64 and pygtk, I’ve added to my keybindings:

{ "keys": "ctrl+shift+c"], "command": "color_pick" }

but when I press this combination when hex value is selected nothing happens…[/quote]

You need to run the script using your python.exe, so just change this line in sublimecp.py

args = [path.join(sublime.packages_path(), 'ColorPicker', 'lib', 'colorchooser.py')]

To something like

args = [path.join('c:\\', 'Python26', 'python.exe'), path.join(sublime.packages_path(), 'ColorPicker', 'lib', 'colorchooser.py')]

It will work, but not as well as the linux version. I made a small .exe using py2exe but it don’t output the color to stdout after you click ok :frowning:

If you’re on a Mac you can use this one, which is basically the same plugin with a different color picker (my plugin is just a port :smile: ) : github.com/jnordberg/sublime-colorpick/
If you want the same color picker app you need to build and install pygtk for OSX

0 Likes

#9

Thanks, that works! Also I’ve had wrong version of pygtk installed (for others: be sure to install all-in-one installer).

0 Likes

#10

This is awesome :smile: Many thanks!

0 Likes