PHP: Convert shorthand Hex Colors to Regular

Posted by Chad Whitaker on Stack Overflow See other posts from Stack Overflow or by Chad Whitaker
Published on 2010-03-14T21:44:31Z Indexed on 2010/03/14 21:55 UTC
Read the original article Hit count: 290

Filed under:
|
|

I'm trying to make a function that will take short hand hex color to the long hex color.

For example if someone submits "f60" it will convert to "ff6600". I understand I need to repeat each number as itself, but what is the most efficient way to do this?

Thank you.

© Stack Overflow or respective owner

Related posts about php

Related posts about color