New project: Hextractor

Hextractor

Have you ever looked at your CSS and wished you could get a quick overview of the colors you’re using in it? Now you can.

I just launched Hextractor, a web-based tool to generate an HTML color palette from your CSS. Paste in your stylesheet, upload it, or enter its URL, and you’ll get back an HTML palette showing your colors in hexadecimal, RGB, or named colors when possible. Or all three if you like.

This project was conceived when Sarai was redesigning her site a little while back. She said to me, “I wish there was some way I could see what colors I have in my stylesheet”. And thus, the idea for Hextractor took root. A month or so later, here it is.

The back-end is written in PHP, with a JavaScript front end powered by the Prototype Ajax library. I’ve released the PHP class used to convert colors between hexadecimal, RGB, and named colors and also ported it to Ruby. Both files are released under the MIT license and can be downloaded now.

It will work in any modern version of Firefox or Safari, and also IE6 and up.

I hope people find it useful. Try it out.