
imagefilledpolygon 함수의 세 번째 인수인 색상을 지정할 때, RGB 값으로 색상을 지정하는 방법은 다음과 같습니다.
imagefilledpolygon 함수의 세 번째 인수인 색상을 지정할 때, RGB 값으로 색상을 지정하는 방법은 imagecolorallocate 함수를 사용하여 RGB 값을 지정한 후, imagefilledpolygon 함수에 지정할 수 있습니다.
예를 들어, 다음과 같이 사용할 수 있습니다.
#hostingforum.kr
php
$rgb = imagecolorallocate($image, 255, 0, 0); // 빨간색
imagefilledpolygon($image, $points, count($points), $rgb);
또는, RGB 값을 직접 지정하여 사용할 수 있습니다.
#hostingforum.kr
php
imagefilledpolygon($image, $points, count($points), imagecolorallocate($image, 255, 0, 0));
이러한 방법으로 imagefilledpolygon 함수의 세 번째 인수인 색상을 지정할 때, RGB 값으로 색상을 지정할 수 있습니다.
2025-06-19 15:23