rearranged
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
ab50921e88
commit
f98c6059b8
@ -183,12 +183,12 @@
|
|||||||
// Returns a gradient lighter color;
|
// Returns a gradient lighter color;
|
||||||
+ (nonnull UIColor *)mfGradientColor:(nullable UIColor *)color;
|
+ (nonnull UIColor *)mfGradientColor:(nullable UIColor *)color;
|
||||||
|
|
||||||
|
// Returns if the color is dark or not
|
||||||
|
- (BOOL)isDark;
|
||||||
|
|
||||||
#pragma mark - Hex String
|
#pragma mark - Hex String
|
||||||
|
|
||||||
+ (nullable NSString *)hexStringForColor:(nonnull UIColor*)color;
|
+ (nullable NSString *)hexStringForColor:(nonnull UIColor*)color;
|
||||||
+ (nonnull UIColor *)mfGetColorForHexWithTransparency:(nonnull NSString *)hexString;
|
+ (nonnull UIColor *)mfGetColorForHexWithTransparency:(nonnull NSString *)hexString;
|
||||||
|
|
||||||
// Returns if the color is dark or not
|
|
||||||
- (BOOL)isDark;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -389,6 +389,12 @@
|
|||||||
return [UIColor whiteColor];
|
return [UIColor whiteColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)isDark {
|
||||||
|
CGFloat greyScale = 0;
|
||||||
|
[self getWhite:&greyScale alpha:nil];
|
||||||
|
return greyScale < 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Hex String
|
#pragma mark - Hex String
|
||||||
|
|
||||||
+ (nullable NSString *)hexStringForColor:(nonnull UIColor*)color {
|
+ (nullable NSString *)hexStringForColor:(nonnull UIColor*)color {
|
||||||
@ -403,10 +409,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isDark {
|
|
||||||
CGFloat greyScale = 0;
|
|
||||||
[self getWhite:&greyScale alpha:nil];
|
|
||||||
return greyScale < 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user