3 가지 UIColors의 색조, 채도 및 밝기를 얻은 결과를 보여 드리겠습니다.[UIColor whiteColor]와 blackColor의 밝기가 같은 이유
[[UIColor redColor] getHue:&hue
saturation:&saturation
brightness:&brightness
alpha:&alpha];
hue = 1.0 saturatino = 1.0 brightness = 1.0 alpha = 0.0
[[UIColor whiteColor] getHue:&hue
saturation:&saturation
brightness:&brightness
alpha:&alpha];
hue = 0.0 saturatino = 0.0 brightness = 0.0 alpha = 0.0
흰색과 검은 색 색상의 색조, 채도, 밝기가 동일한 이유
[[UIColor blackColor] getHue:&hue
saturation:&saturation
brightness:&brightness
alpha:&alpha];
hue = 0.0 saturatino = 0.0 brightness = 0.0 alpha = 0.0
사람이 설명 할 수 있습니까? 왜 알파는 0입니까? 내 프로젝트에하고 싶었던 무엇
은 밝기 변화에 의해 주어진 색상의 '어두운'색상을 생성 할 수 있습니다 :
밝기 = 밝기 * 0.8;
어떤 색상에도 문제가 없지만 흰색 색상은 검은 색입니다. (비록 나는 회색 색을 기대할 것이다).
+1 멋진 캐치,이 시도하지 않았다. –
'saturatino' 소리가났다. :) –