It's fairly simple...
the hex color code is just: #RRGGBB
So use the string functions to separate out each color (probably substr) then use hexdec to convert it into a decimal number.
Chris
Ashwin Purohit wrote:
Hello Everyone,
I would like to know if there is some way to write a script so that I can input a Hex color code and have it output to RGB coordinates so as to prevent users from having to search for the color codes? I will use that feature so that I can create dynamic images.
Thanks in advance,
Ashwin Puroit.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php