Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-28-2007, 03:31 PM   PM User | #1
para15000
New Coder

 
Join Date: Feb 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
para15000 is an unknown quantity at this point
function for splitting a color code into red green blue

I know such a function exists but I can't remember it's name

if you know please tell

thank you
para15000 is offline   Reply With Quote
Old 05-28-2007, 04:11 PM   PM User | #2
GJay
Senior Coder

 
Join Date: Sep 2005
Posts: 1,791
Thanks: 5
Thanked 36 Times in 35 Posts
GJay is on a distinguished road
what are you taking as input, and what would you want as output?

something like:
PHP Code:
$string='ffff99';
$split str_split($string,2);
$r hexdec($split[0]);
$g hexdec($split[1]);
$b hexdec($split[2]); 
?
__________________
My thoughts on some things: http://codemeetsmusic.com
And my scrapbook of cool things: http://gjones.tumblr.com
GJay is offline   Reply With Quote
Old 05-29-2007, 08:36 AM   PM User | #3
para15000
New Coder

 
Join Date: Feb 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
para15000 is an unknown quantity at this point
I know about this but there is a function that does this automatically. A function for color codes. A specific function.
para15000 is offline   Reply With Quote
Old 05-29-2007, 01:01 PM   PM User | #4
meth
Regular Coder

 
meth's Avatar
 
Join Date: Jan 2003
Posts: 262
Thanks: 0
Thanked 9 Times in 9 Posts
meth is on a distinguished road
A built-in php function? Never heard of it.

Here's a substitute
__________________
I do Web Design, Brisbane based.
More time spent in PHP/MySQL Web Development.
And Search Engine Optimisation takes up the rest of it.
meth is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:30 AM.


Advertisement
Log in to turn off these ads.