Quote:
Originally Posted by marshusensei
Is there some kind of chart that gives the codes for Colors in RGB? in the format 1.0, 0.0, 1.0, 1.0
Thanks, this may be a very silly question.
|
I bet somebody has created such a chart somewhere on the internet.
In the meantime, the UIKit has a number of "standard colors as UIColors:
[UIColor blueColor];
[UIColor redColor];
Here's the list of predefined colors from the Xcode docs
+ blackColor
+ darkGrayColor
+ lightGrayColor
+ whiteColor
+ grayColor
+ redColor
+ greenColor
+ blueColor
+ cyanColor
+ yellowColor
+ magentaColor
+ orangeColor
+ purpleColor
+ brownColor
+ clearColor
and you can get the CGColor for a UIColor like this:
[[UIColor blueColor] CGColor];
You could also ask the standard UIKit colors for their R/G/B values using the method getRed:green:blue:alpha:
It would take about 5 minutes to write a program that would put all the standard colors into an array, then interrogate the R/G/B values of each color and write them to the console log.