I need to use custom colors in my app. I've found some nice HTML colors and converted them to RGB values then apply them with:
[UIColor colorWithRed:235 green:242 blue:212 alpha:1]
The problem is the resulting color in my app isn't correct. Sometime it's just white and other times it's just way off. Red could be yellow etc.
Has anybody come across this before? Am I converting the colors incorrectly or something.
Simply divide all you color values by 255:
[UIColor colorWithRed:235/255.0f green:242/255.0f blue:212/255.0f alpha:1]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With