PS中或者其他画板App,都会有取色器,一般两种,一种是取色条,另一种是取色盘,如下图:
PS 取色盘取色条或者取色盘都是色相的一种表现形式,用这种取色的时候,一般再配合饱和度(saturation)、亮度(brightness)、透明度(alpha)就能取任何颜色了。
色相的范围是0-360,拾色器其实就是把范围取六种颜色(0,60,120,180,240,300,360),然后组成的渐变,如下图:
取色的时候saturation、brightness、alpha均为最大值,代码如下:
UIColor *color0 = [UIColor colorWithHue:0.0/6.0 saturation:1 brightness:1 alpha:1];
UIColor *color1 = [UIColor colorWithHue:1.0/6.0 saturation:1 brightness:1 alpha:1];
UIColor *color2 = [UIColor colorWithHue:2.0/6.0 saturation:1 brightness:1 alpha:1];
UIColor *color3 = [UIColor colorWithHue:3.0/6.0 saturation:1 brightness:1 alpha:1];
UIColor *color4 = [UIColor colorWithHue:4.0/6.0 saturation:1 brightness:1 alpha:1];
UIColor *color5 = [UIColor colorWithHue:5.0/6.0 saturation:1 brightness:1 alpha:1];
UIColor *color6 = [UIColor colorWithHue:6.0/6.0 saturation:1 brightness:1 alpha:1];
网友评论