IOS開発の──色設定


色の設定:
RGBを指定します.パラメータは赤、緑、黄、透明度、範囲は0-1です.
+ (UIColor *)colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;

HSBを指定します.パラメータは、色相(hue)、飽和(saturation)、輝度(brightness)です.
+ (UIColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha;

現在のカラーで透明度を変更したカラー:
UIColor *color = [UIColor redColor];
UIColor *cl = [color colorWithAlphaComponent:0.5f];

255のカラー値をカスタマイズし、255を0-1に変更
CGFloat R  = (CGFloat) 225/255.0;
CGFloat G = (CGFloat) 66/255.0;
CGFloat B = (CGFloat) 88/255.0;
CGFloat alpha = (CGFloat) 1.0;
    
UIColor *myColorRGB = [ UIColor colorWithRed: R  green: G  blue: B  alpha: alpha  ];
self.tableView.backgroundColor = myColorRGB;

最後に添付
UIcolor公式APIドキュメント:
Creating a UIColor Object from Component Values + colorWithWhite:alpha: + colorWithHue:saturation:brightness:alpha: + colorWithRed:green:blue:alpha: + colorWithCGColor: + colorWithPatternImage: + colorWithCIColor: – colorWithAlphaComponent:
Initializing a UIColor Object – initWithWhite:alpha: – initWithHue:saturation:brightness:alpha: – initWithRed:green:blue:alpha: – initWithCGColor: – initWithPatternImage: – initWithCIColor:
Creating a UIColor with Preset Component Values + blackColor + darkGrayColor + lightGrayColor + whiteColor + grayColor + redColor + greenColor + blueColor + cyanColor + yellowColor + magentaColor + orangeColor + purpleColor + brownColor + clearColor