Last active
August 29, 2015 14:13
-
-
Save Sephiroth-XIII/96e163bd5d98bf50ec35 to your computer and use it in GitHub Desktop.
Simple way to minimize the effort while defining color palette for an app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "UIColor+MyApp.h" | |
@implementation UIColor(MyApp) | |
+(UIColor *)RGB:(long)hex A:(float)a { | |
return [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 green:((float)((hex & 0xFF00) >> 8))/255.0 blue:((float)(hex & 0xFF))/255.0 alpha:a]; | |
} | |
+(UIColor *)MABlue { | |
return [self RGB:(0x12AFE8) A:1.0]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment