Add this to the header file: (something like helpers.h)
#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
Then add this to YourApp_Prefix.pch
#import "helpers.h"
Finally, when you need color, you should use this:
UIColor* myColor = RGBCOLOR(64,87,188);
source share