brightnessComponent
カラーのHSBの輝度値を返します
解説
カラーのHSBの輝度値を返します。
カラーがRGBカラーでなければ、例外を起こします。
返り値
( CGFloat )
輝度0.0-1.0
引数
フレームワーク
ApplicationKit
クラス
NSColor
Instance Methods
使用可能
10.0
参照
- getHue:saturation:brightness:alpha:
例文
#import "Controller.h" @implementation Controller - (IBAction)myAction:(id)sender { NSColor *theColor = [NSColor colorWithDeviceHue:1 saturation:0.3 brightness:0.8 alpha:1];//ÉJÉâÅ[çÏê¨ [name setStringValue:@"HueColor"]; [name setTextColor:theColor]; [h setFloatValue:[theColor hueComponent]]; [s setFloatValue:[theColor greenComponent]]; [b setFloatValue:[theColor brightnessComponent]]; [alpha setFloatValue:[theColor alphaComponent]]; } @end