rearranged

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-09-27 15:53:53 -05:00
parent ab50921e88
commit f98c6059b8
2 changed files with 9 additions and 9 deletions

View File

@ -183,12 +183,12 @@
// Returns a gradient lighter color;
+ (nonnull UIColor *)mfGradientColor:(nullable UIColor *)color;
// Returns if the color is dark or not
- (BOOL)isDark;
#pragma mark - Hex String
+ (nullable NSString *)hexStringForColor:(nonnull UIColor*)color;
+ (nonnull UIColor *)mfGetColorForHexWithTransparency:(nonnull NSString *)hexString;
// Returns if the color is dark or not
- (BOOL)isDark;
@end

View File

@ -389,6 +389,12 @@
return [UIColor whiteColor];
}
- (BOOL)isDark {
CGFloat greyScale = 0;
[self getWhite:&greyScale alpha:nil];
return greyScale < 0.5;
}
#pragma mark - Hex String
+ (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