ImageMagick ImagickPixel::getHSL
(PECL imagick 2, PECL imagick 3)
ImagickPixel::getHSL — ImagickPixel 개체의 정규화된 HSL 색상을 반환합니다.
설명
public ImagickPixel::getHSL(): array
ImagickPixel 개체에 의해 설명된 정규화된 HSL 색상을 반환합니다. 세 값 각각은 0.0과 1.0 사이의 부동 소수점 숫자입니다.
매개변수
이 함수에는 매개변수가 없습니다.
반환 값
"hue", "saturation" 및 "luminosity" 키가 있는 배열의 HSL 값을 반환합니다. 실패 시 ImagickPixelException을 던집니다.
Examples
예제 #1 기본 Imagick::getHSL() 예제
<?php
$color = new ImagickPixel('rgb(90%, 10%, 10%)');
$colorInfo = $color->getHSL();
print_r($colorInfo);
?>
위의 예는 다음을 출력합니다.
Array ( [hue] => 0 [saturation] => 0.80001220740379 [luminosity] => 0.50000762951095 )
메모
메모: ImageMagick 라이브러리 버전 6.2.9 이상에서 사용할 수 있습니다.