RGB to Hex Converter

I have been working on my dads website, using a wordpress theme generator and this handy colour scheme book that I bought a couple of years back. (Yeah! I have a book with lots of colour swatches in it. I’m borderline dyslexic and don’t have any colour co-ordination.)

This book, has a small section in the back for web safe colours with hex values, the rest is all RGB and CMYK values for the printed page. Because there is a greater range of swatches in the first half, I created this small app to quickly turn an RGB value into Hex:

RGB Converter Image

Features: 

  • Automatically copies the hex value to the clipboard
  • Automatically skips to the next RGB colour value after a valid 3 character colour has been entered (enter 0′s for padding)
  • Ocassionally will skip over an RGB colour field
  • Pressing any other key when an RGB colour field has focus will automatically validate that field

Grab the source code here

It is not a perfect solution but it allowed me to quickly key in an RGB value and get the hex code. The result was quite good actually, quite a few of the RGB/CYMK printed colour schemes worked well in a web browser.

Leave a Reply