Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS-How to display Gold color

Tags:

ios

colors

I'm trying to set the background color of my view to gold. I've found RGB values for several tones of this value. For this I simply do this:

[myView.backgroundColor=[UIColor colorWithRed:252.0 green:194.0 blue:0 alpha:1.0]];

But i just get the same color as for the yellow. The same is true for silver color. I get the same color as for white. Is there a way to achieve this or iOS does not support this?

like image 479
Mikayil Abdullayev Avatar asked Mar 09 '12 21:03

Mikayil Abdullayev


1 Answers

color values are between 0 to 1.0f

myView.backgroundColor=[UIColor colorWithRed:252.0/255.0 
                                 green:194.0/255.0 blue:0 alpha:1.0];
like image 129
Alkimake Avatar answered Sep 20 '22 01:09

Alkimake