I want to create a custom color for my labels. Looking for a darker green than what is given.
The code I have is below:
switch()
{
case0:
[answerLabel0 setTextColor:[UIColor greenColor]];
break;
case1:
[answerLabel1 setTextColor:[UIColor greenColor]];
break;
case2:
[answerLabel2 setTextColor:[UIColor greenColor]];
break;
case3:
[answerLabel3 setTextColor:[UIColor greenColor]];
break;
default:
break;
}
Can someone help please?
use
[UIColor colorWithRed:green:blue:alpha]methodfor example:
[UIColor colorWithRed:0.5 green:0.8 blue:0.5 alpha:1.0]note that the rgb values are from 0 to 1, not 0 to 255.