Chameleon v2.0.0 Release Notes
-
- โ Added support for hex colors, colors from images, themes, and lighten and darken by percentage methods. (By @ViccAlexander)
Added Methods
Chameleon.h
- ๐
+ (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor withContentStyle:(UIContentStyle)contentStyle;
+ (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor withSecondaryColor:(UIColor *)secondaryColor andContentStyle:(UIContentStyle)contentStyle;
+ (void)setGlobalThemeUsingPrimaryColor:(UIColor *)primaryColor withSecondaryColor:(UIColor *)secondaryColor usingFontName:(NSString *)fontName andContentStyle:(UIContentStyle)contentStyle;
NSArray+Chameleon.h
+ (NSArray *)arrayOfColorsFromImage:(UIImage *)image withFlatScheme (BOOL)isFlatScheme;
UIColor+Chameleon.h
+ (UIColor *)colorWithAverageColorFromImage:(UIImage *)image;
+ (UIColor *)colorWithAverageColorFromImage:(UIImage *)image withAlpha:(CGFloat)alpha;
- ๐
+ (UIColor *)colorWithRandomFlatColorOfShadeStyle:(UIShadeStyle)shadeStyle withAlpha:(CGFloat)alpha;
+ (UIColor *)colorWithComplementaryFlatColorOf:(UIColor *)color withAlpha:(CGFloat)alpha;
+ (UIColor *)colorWithContrastingBlackOrWhiteColorOn:(UIColor *)backgroundColor isFlat:(BOOL)flat alpha:(CGFloat)alpha;
+ (UIColor *)colorWithFlatVersionOf:(UIColor *)color withAlpha:(CGFloat)alpha;
+ (UIColor *)colorWithHexString:(NSString *)string;
+ (UIColor *)colorWithHexString:(NSString *)string withAlpha:(CGFloat)alpha;
- (UIColor *)flatten;
- (UIColor *)darkenByPercentage:(CGFloat)percentage;
- (UIColor *)lightenByPercentage:(CGFloat)percentage;
UINavigationController+Chameleon.h
- ๐
- (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle;
- ๐
- (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor withContentStyle:(UIContentStyle)contentStyle;
- (void)setThemeUsingPrimaryColor:(UIColor *)primaryColor withSecondaryColor:(UIColor *)secondaryColor andContentStyle:(UIContentStyle)contentStyle;
setThemeUsingPrimaryColor:(UIColor *)primaryColor withSecondaryColor:(UIColor *)secondaryColor usingFontName:(NSString *)fontName andContentStyle:(UIContentStyle)contentStyle;
- ๐
- (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle;
๐ ###### Deprecated Methods
NSArray+Chameleon.h
+ (NSArray *)arrayOfColorsWithColorScheme:(ColorScheme)colorScheme with:(UIColor *)color flatScheme:(BOOL)isFlatScheme
Replaced with:
+ (NSArray *)arrayOfColorsWithColorScheme:(ColorScheme)colorScheme usingColor:(UIColor *)color withFlatScheme:(BOOL)isFlatScheme;
UIViewController+Chameleon.h
- (void)flatify;
- (void)flatifyAndContrast;
Added Macros
AverageColorFromImage(image)
AverageColorFromImageWithAlpha(image, alpha)
RandomFlatColorWithShadeAndAlpha(shade, alpha)
ColorsWithScheme(colorSchemeType, color, isFlatScheme)
ComplementaryFlatColorWithAlpha(color, alpha)
ContrastColorWithAlpha(backgroundColor, returnFlat, alpha)
HexColor(hexString)
HexColorWithAlpha(hexString, alpha)
RandomFlatColorWithShadeAndAlpha(shade, alpha)
ColorsFromImage(image, isFlatScheme)
๐ ######Deprecated
ColorsWithScheme(colorSchemeType, color, isFlatScheme)
Replaced with:
ColorsWithScheme(colorSchemeType, color, isFlatScheme)