|
Posted by Geradeaus on 11/22/05 17:22
"BKDotCom" <bkfake-google@yahoo.com> schreef in bericht
news:1132609645.351960.39840@g47g2000cwa.googlegroups.com...
> Suggestion:
> replace these 3 lines
> $r = hexdec(substr($c,1,2));
> $g = hexdec(substr($c,3,2));
> $b = hexdec(substr($c,5,2));
>
> with
>
> $c = strreplace('#','',$c); // remove "#" from color string if exists
> list($r,$g,$b) = sscanf($c,'%2s%2s%2s');
that whas what I needed :) Thanks!
[Back to original message]
|