I have a UILabel with black color;
i am writing the following code to get black color\'s components.
UIColor *aColor = [aLabel.textColor retain];
con
I think this is a very nice way to get the rgb representation of any UIColor*, which already has a convenience method for retaining it´s components.
-(CGColorRef)CGColorRefFromUIColor:(UIColor*)newColor {
CGFloat components[4] = {0.0,0.0,0.0,0.0};
[newColor getRed:&components[0] green:&components[1] blue:&components[2] alpha:&components[3]];
CGColorRef newRGB = CGColorCreate(CGColorSpaceCreateDeviceRGB(), components);
return newRGB;
}