iphone创建颜色 Creating Quartz Colors
结构体CGColor Reference 指出Creating Quartz Colors四种方法:
CGColorCreate
CGColorCreateCopy
CGColorCreateCopyWithAlpha
CGColorCreateWithPattern
1、使用CGColorCreate
CGColorRef CGColorCreate (
CGColorSpaceRef colorspace,
const CGFloat components[]
);
1 CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB();
2 const CGFloat myColor[] = {0.90625, 0.80, 0.80, 1.0};
3 CGColorRef ref = CGColorCreate(rgb, myColor);