$r, 'green'=>$g, 'blue'=>$b); return $rgb; } function decColorhex($r, $g, $b){ $rgb['red'] = dechex($r); $rgb['green'] = dechex($g); $rgb['blue'] = dechex($b); foreach($rgb as $key => $color){ foreach (count_chars($color) as $my_value){ $length=$length+$my_value; } if($length < 2){ $color = '0'. $color; $rgb[$key] = $color; } //echo $key; //echo "=$color
"; $length = ''; } return $rgb; } ?>