39 lines
758 B
Objective-C
39 lines
758 B
Objective-C
//
|
|
// AWP_Color.m
|
|
// HD wallpaper
|
|
|
|
|
|
#import "AWP_Color.h"
|
|
|
|
//@implementation AWP_Color : NSObject
|
|
@implementation UIColor (CustomCoAWP_Colorlors)
|
|
// UIColor+CustomColors.m
|
|
+ (UIColor *)customRedColor {
|
|
return [UIColor colorWithRed:0.8 green:0.2 blue:0.2 alpha:1.0];
|
|
}
|
|
|
|
+ (UIColor *)customGreenColor {
|
|
return [UIColor colorWithRed:0.2 green:0.8 blue:0.2 alpha:1.0];
|
|
}
|
|
|
|
+ (UIColor *)customBlueColor {
|
|
return [UIColor colorWithRed:0.2 green:0.2 blue:0.8 alpha:1.0];
|
|
}
|
|
|
|
+ (UIColor *)colorWithHex:(UInt32)hex {
|
|
CGFloat red = ((hex & 0xFF0000) >> 16) / 255.0;
|
|
CGFloat green = ((hex & 0x00FF00) >> 8) / 255.0;
|
|
CGFloat blue = (hex & 0x0000FF) / 255.0;
|
|
return [UIColor colorWithRed:red green:green blue:blue alpha:1.0];
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
|