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)