View Full Version : function for splitting a color code into red green blue
05-28-2007, 04:31 PM
I know such a function exists but I can't remember it's name
if you know please tell
what are you taking as input, and what would you want as output?
$split = str_split($string,2);
$r = hexdec($split);
$g = hexdec($split);
$b = hexdec($split);
05-29-2007, 09:36 AM
I know about this but there is a function that does this automatically. A function for color codes. A specific function.
A built-in php function? Never heard of it.
Here's a substitute (http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.