Created
July 25, 2015 14:40
-
-
Save TheFinestArtist/7263fde7a5425c308b2f to your computer and use it in GitHub Desktop.
UIColor+Custom
This file contains hidden or 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
// | |
// UIColor+Custom.h | |
// | |
// Created by TheFinestArtist | |
// | |
#import <Foundation/Foundation.h> | |
@interface UIColor (Custom) | |
+ (UIColor *)navy:(CGFloat)alpha; | |
+ (UIColor *)cyan:(CGFloat)alpha; | |
+ (UIColor *)white:(CGFloat)alpha; | |
+ (UIColor *)grey:(CGFloat)alpha; | |
+ (UIColor *)silver:(CGFloat)alpha; | |
+ (UIColor *)black:(CGFloat)alpha; | |
+ (UIColor *)red:(CGFloat)alpha; | |
@end |
This file contains hidden or 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
// | |
// UIColor+Custom.m | |
// | |
// Created by TheFinestArtist | |
// | |
#import "UIColor+Custom.h" | |
@implementation UIColor (Custom) | |
+ (UIColor *)navy:(CGFloat)alpha { | |
return [UIColor colorWithRed:0 green:0.447 blue:0.69 alpha:alpha]; | |
} | |
+ (UIColor *)cyan:(CGFloat)alpha { | |
return [UIColor colorWithRed:0.20 green:0.71 blue:0.898 alpha:alpha]; | |
} | |
+ (UIColor *)grey:(CGFloat)alpha { | |
return [UIColor colorWithRed:0.914 green:0.914 blue:0.969 alpha:alpha]; | |
} | |
+ (UIColor *)black:(CGFloat)alpha { | |
return [UIColor colorWithRed:0.098 green:0.098 blue:0.153 alpha:alpha]; | |
} | |
+ (UIColor *)silver:(CGFloat)alpha { | |
return [UIColor colorWithRed:0.427 green:0.427 blue:0.482 alpha:alpha]; | |
} | |
+ (UIColor *)white:(CGFloat)alpha { | |
return [UIColor colorWithRed:0.945 green:0.945 blue:1.00 alpha:alpha]; | |
} | |
+ (UIColor *)red:(CGFloat)alpha { | |
return [UIColor colorWithRed:0.757 green:0.153 blue:0.176 alpha:alpha]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment