Modify Hex entry to more closely resemble PS

Entering a hex value such as 345 into photoshop's color picker will result in a 6 digit color hex of #000345. Currently jPicker would return a color of #00000534. Photoshop is prepending 0's to any hex value of length less than 6, whereas jPicker is tagging each two-digit substring as R, G, or B. This becomes a little confusing with values such as 345, where you would expect 03 to be green and not 05.