Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    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

  • #3
    New Coder
    Join Date
    Feb 2007
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know about this but there is a function that does this automatically. A function for color codes. A specific function.

  • #4
    Regular Coder meth's Avatar
    Join Date
    Jan 2003
    Posts
    262
    Thanks
    0
    Thanked 9 Times in 9 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •