Here are instructions on how to do it step by step.
- Fire up Sublime Text 2
- Press CTRL+` (the key above the TAB key)
- You'll see a console window take up the bottom portion of the window. Paste the following block of code there
- Close Sublime Text and reopen it
- Press CTRL+SHIFT+P to open the Command Palette
- Start typing in "Package" and select the Package Control: Install Package option and hit Enter
- The dialog changes to a list of available packages. Type in "Color" and select ColorPicker
(Credit goes out to Weslley Honorato for creating the package) - No restart of Sublime required this time around. It's ready to use
- Open a stylesheet or an area where you want to insert a hex color
- Press CTRL+SHIFT+C to bring up the color selection dialog
- That's it!
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
(This will install the Sublime Text 2 Package Control system which is similar to Gem, NuGet, NPM, etc.)
Hello!
ReplyDeletePlease also take a look at Color Tools: http://www.color-tools.com/
This is a color picker (and not only color picker) which can be used with Sublime Text.