function rgb($color) {
		if (is_string($color))
			$color=hexdec($color);
		$hex=str_pad($hex=dechex($color),$color<4096?3:6,'0',STR_PAD_LEFT);
		if (($len=strlen($hex))>6)
			user_error(sprintf(self::E_Color,'0x'.$hex),E_USER_ERROR);
		$color=str_split($hex,$len/3);
		foreach ($color as &$hue) {
			$hue=hexdec(str_repeat($hue,6/$len));
			unset($hue);
		}
		return $color;
	}
function rgb($color) {
		if (is_string($color))
			$color=hexdec($color);
		$hex=str_pad($hex=dechex($color),$color<4096?3:6,'0',STR_PAD_LEFT);
		if (($len=strlen($hex))>6)
			user_error(sprintf(self::E_Color,'0x'.$hex),E_USER_ERROR);
		$color=str_split($hex,$len/3);
		foreach ($color as &$hue) {
			$hue=hexdec(str_repeat($hue,6/$len));
			unset($hue);
		}
		return $color;
	}
function rgb ( $ color ) { if ( is_string ( $ color ) ) $ color = hexdec ( $ color ) ; $ hex = str_pad ( $ hex = dechex ( $ color ) , $ color < 4096 ? 3 : 6 , '0' , STR_PAD_LEFT ) ; if ( ( $ len = strlen ( $ hex ) ) > 6 ) user_error ( sprintf ( self :: E_Color , '0x' . $ hex ) , E_USER_ERROR ) ; $ color = str_split ( $ hex , $ len / 3 ) ; foreach ( $ color as & $ hue ) { $ hue = hexdec ( str_repeat ( $ hue , 6 / $ len ) ) ; unset ( $ hue ) ; } return $ color ; }
Convert RGB hex triad to array
@return array|FALSE
@param $color int|string
Convert RGB hex triad to array