Home Download Buy Blog Forum Support

Color Picker plugin

Color Picker plugin

Postby weslly on Tue Oct 11, 2011 4:11 am

UPDATE: Now with windows support!

source and installation details can be found at:
https://github.com/weslly/ColorPicker
Last edited by weslly on Fri Jan 27, 2012 5:43 pm, edited 5 times in total.
weslly
 
Posts: 202
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: Color Picker plugin

Postby facelessuser on Tue Oct 11, 2011 4:43 am

This is pretty awesome. Thanks.
facelessuser
 
Posts: 1548
Joined: Tue Apr 05, 2011 7:38 pm

Re: Color Picker plugin

Postby clockwork on Wed Oct 12, 2011 6:46 pm

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 :)
clockwork
 
Posts: 4
Joined: Sat Sep 17, 2011 11:32 am

Re: Color Picker plugin

Postby weslly on Thu Oct 13, 2011 5:28 am

clockwork wrote: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 :)


It works if you install python and pygtk for windows

Image

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) :(

btw, try this one:
viewtopic.php?p=15818#p15818 :)
weslly
 
Posts: 202
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: Color Picker plugin

Postby clockwork on Thu Oct 13, 2011 10:08 am

Thank you weslly! Really appreciate it!
clockwork
 
Posts: 4
Joined: Sat Sep 17, 2011 11:32 am

Re: Color Picker plugin

Postby chodorowicz on Thu Oct 13, 2011 6:05 pm

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:
Code: Select all
{ "keys": ["ctrl+shift+c"], "command": "color_pick" }

but when I press this combination when hex value is selected nothing happens...
chodorowicz
 
Posts: 18
Joined: Tue Oct 11, 2011 4:04 pm

Re: Color Picker plugin

Postby MrMartineau on Thu Oct 13, 2011 7:00 pm

I know you say its linux only, but can this work on a Mac?
@MrMartineau || Setup Sublime Text quickly: Find out all you need at https://github.com/mrmartineau/SublimeTextSetup
MrMartineau
 
Posts: 78
Joined: Thu Jul 28, 2011 8:35 am

Re: Color Picker plugin

Postby weslly on Thu Oct 13, 2011 7:52 pm

chodorowicz wrote: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:
Code: Select all
{ "keys": ["ctrl+shift+c"], "command": "color_pick" }

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


You need to run the script using your python.exe, so just change this line in sublimecp.py
Code: Select all
args = [path.join(sublime.packages_path(), 'ColorPicker', 'lib', 'colorchooser.py')]

To something like
Code: Select all
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 :(

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


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 :) ) : https://github.com/jnordberg/sublime-colorpick/
If you want the same color picker app you need to build and install pygtk for OSX
weslly
 
Posts: 202
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: Color Picker plugin

Postby chodorowicz on Fri Oct 14, 2011 1:54 pm

weslly wrote:You need to run the script using your python.exe, so just change this line in sublimecp.py
Code: Select all
args = [path.join(sublime.packages_path(), 'ColorPicker', 'lib', 'colorchooser.py')]

To something like
Code: Select all
args = [path.join('c:\\', 'Python26', 'python.exe'), path.join(sublime.packages_path(), 'ColorPicker', 'lib', 'colorchooser.py')]


Thanks, that works! Also I've had wrong version of pygtk installed (for others: be sure to install all-in-one installer).
chodorowicz
 
Posts: 18
Joined: Tue Oct 11, 2011 4:04 pm

Re: Color Picker plugin

Postby seeyou on Wed Oct 26, 2011 6:12 am

This is awesome :) Many thanks!
seeyou
 
Posts: 5
Joined: Wed Aug 17, 2011 12:15 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 6 guests