blueColor
青色のNSColorを返します
解説
青色のNSColorを返します。
RGB値が0.0、0.0、1.0、アルファ値が1.0のNSColorを返します。
返り値
( NSColor * )
カラー
引数
フレームワーク
ApplicationKit
クラス
NSColor
Class Methods
使用可能
10.0
参照
- blueComponent
例文
#import "Controller.h" @implementation Controller - (IBAction)myAction:(id)sender { NSColor *theColor = [NSColor blueColor];//カラー作成 [name setStringValue:@"blue"];//outlet nameに文字をセット [name setTextColor:theColor];//outlet name(text field)の文字色をtheColorにする [r setFloatValue:[theColor redComponent]];//outlet r(text field)にtheColorのred値をセット [g setFloatValue:[theColor greenComponent]];//outlet g(text field)にtheColorのgreen値をセット [b setFloatValue:[theColor blueComponent]];//outlet b(text field)にtheColorのblue値をセット [alpha setFloatValue:[theColor alphaComponent]];//outlet b(text field)にtheColorのalpha値をセット } @end