Browsing articles from "December, 2014"

hc: Hex Color Command-Line Tool for OS X

By Rob Warner  //  Development, Mac, Software  //  No Comments

I’ve been working a lot lately with LESS and Bootstrap, and wanted an easier and quicker way to visualize colors and what the various LESS operations do to them. So, I built hc — Hex Colors on the Command Line. It’s written in Objective-C and works on Mac OS X 10.9+.

It’s still in its infancy, of course, but it lets you do things like show, lighten, or darken colors. To show the color red, for example, type:

hc show f00

That will display, in your console, the text:

hex: #ff0000
rgb: 255, 0, 0
hsl: 0°, 100%, 50%

You can pass 3- or 6-character hex codes. You can also change the output format using the -o/–output option. To write the color to an image file, for example, type:

hc show f00 --output file

This will create a 256×256 PNG file in your current directory called ff0000.png that looks like this:


You can also write the textual results to the clipboard using -o clip, or to a user notification (thanks for the idea, Rob!) using -o note. The notification looks like this:


Be sure to read the README for more information. Check it out and give me feedback!



I'm Rob Warner, and I'm a software developer. I live in Jacksonville, Florida, and work for Availity, LLC. The postings on this site are my own and do not necessarily reflect the views of Availity.