UIColor+ColorWithHex was inspired by the lack of hexadecimal colour integration of iOS.
-
- (UIColor *)colorWithHex:(UInt32)hexadecimal;
-
- (UIColor *)colorWithHexString:(NSString *)hexadecimal;
-
- (UIColor *)colorWithAlphaHex:(UInt32)hexadecimal;
-
- (UIColor *)colorWithAlphaHexString:(NSString *)hexadecimal;
-
- (NSString *)hexStringFromColor: (UIColor *)color;
-
- (UIColor *)randomColor;
-
- (UIColor *)colorWithHexa:(NSString *)hexadecimal;
Just copy the UIColor+ColorWithHex.h and UIColor+ColorWithHex.m files to your project and #import the header file (UIColor+ColorWithHex.h)