Easy Color Picking in Sublime Text
If you have been accustomed to a code editor that comes with GUI buttons, Sublime Text being a plain simple code editor with minimal buttons, may frustrate you. For example, when adding Color, I usually end up running another application – Photoshop or Colorzilla – for just getting color codes.
But wouldn’t our workflow be more streamlined if we were able to pick up colors without having to leave Sublime Text? If you are facing this same problem, we have a tip for you in the form of a plugin.
Recommended Reading: Working with Code Snippets in Sublime Text
Color Picker is a Sublime Text plugin by Weslly Honorato. This plugin is cross-platform; it works in Windows, OS X, and Linux.
Once installed, go to the Command Palette in Sublime Text by hitting the Command + Shift + P or (Ctrl + Shift + P for Windows). Then search for ColorPicker.
Or you can do it faster just by pressing Command + Shift + C. This will open the native color picker from your OS. This screenshot below shows the color picker in OS X.
If you are on Windows and Linux, the UI will be different.
Select the color, and hit the Pick button, and the color will be inserted into Sublime Text in Hex color format, like so.
HEX To RGB Converter
Note that this tool only generates HEX color format. So if you need RGB format, you will need to install one more plugin that helps you convert HEX color format to RGB color format.
Go to Package Control and install HEX to RGB Converter by Vitor Leal. Once installed, select the Hex color number and hit Shift + Cmd + R to get the RGB code.
Another plugin that will be very helpful is Color Highlighter. Don’t confuse this with Syntax Highlighter, Color Highlighter will let you preview the color when you selet the color code number. Here is what it looks like.
This plugin supports HEX, RGB, and RGBA color formats.
Here are more posts related to Sublime Text we have previously posted: