html2rgb($couleur_html); $couleur_allouee = imagecolorallocate($image, $couleur_rgb[0], $couleur_rgb[1], $couleur_rgb[2]); imagefilledarc($image, $taille/2, $taille/2, $taille, $taille-1, $angle, $angle+$pas_angle, $couleur_allouee, IMG_ARC_PIE); $angle = $angle+$pas_angle; } imagefilledarc($image, $taille/2, $taille/2, $taille, $taille, 0, 360, $faux_noir, IMG_ARC_NOFILL); imagecolortransparent($image, $noir); header('Content-type: image/png'); imagepng($image); imagedestroy($image); } function html2rgb($color) { if ($color[0] == '#') $color = substr($color, 1); if (strlen($color) == 6) list($r, $g, $b) = array($color[0].$color[1], $color[2].$color[3], $color[4].$color[5]); elseif (strlen($color) == 3) list($r, $g, $b) = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]); else return false; $r = hexdec($r); $g = hexdec($g); $b = hexdec($b); return array($r, $g, $b); } } ?>