I've added padding, so that toHex values are always 6 characters long.

This means values aren't too short for use in html and css.