Replace DigitalColor Meter in Lion
I encountered my first major annoyance with Lion today: For no apparent reason, it seems Apple have decided to remove some of the most useful features from the DigitalColor Meter utility. For anyone who does any web development, DigitalColor Meter was great for quickly getting the hex value of any colour displayed on the screen, simply by hovering the cursor over it.
While it’s annoying that DigitalColor Meter is now pretty useless, it’s not too tricky to build our own replacement using a tiny bit of AppleScript with the built in OS X colour picker and a free downloadable plugin.
First we’ll start by creating our colour meter application. Open up AppleScript Editor (located in Applications/Utilities) and type choose color
in the window that appears. This is actually all the AppleScript we need! To test if it works, click the Run button. Hopefully the familiar OS X colour picker should appear. Close it, choose Save As... from the File menu and give it a name like “Colour Meter.” Also, be sure to change the file format drop-down menu to Application. Now, whenever you double-click on this new application, the colour picker will open.
To get hex values in the colour picker, go to Color Palettes tab (the third one along), and change the Palette drop-down menu to Web Safe Colors. To “choose” a colour from somewhere on the screen, just click the magnifying glass, then click on the colour you want.
Straight away you might notice a small problem with the hex values that appear: They aren’t all there! This palette only contains “Web Safe Colors,” which basically means R, G and B values of 00, 33, 66, 99, CC and FF. To get the full range of colours, we will need to install a new colour picker plugin.
The two options are RCWebColorPicker from rubicode, and Hex Color Picker from waffle software. They each have their pros and cons, so it’s worth downloading them both and trying them out before deciding on one (or both).
Installation is fairly straightforward, apart from one quirk you might not be aware of — the Library folder within your user folder is now hidden in Lion. The easiest way to get to it is to hold down the Option key while clicking on the Go menu in the Finder, and choose Library from the list. Inside the Library, find the ColorPickers folder and drag the plugin files there. You will need to log out and in again before the new colour pickers will appear.
One final touch for your colour meter application is to give it a proper icon — by stealing the one from DigitalColor Meter. Find both applications in the Finder and choose Get Info for each of them. Select the DigitalColor Meter icon in its Info window and press Command-C to copy it. Then select the icon for your colour picker application, and press Command-V to paste.