Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Fix colorWithFlatVersionOf(: :) bug #50

Merged
merged 2 commits into from
Sep 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Pod/Classes/Objective-C/UIColor+Chameleon.m
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,10 @@ + (UIColor *)colorWithFlatVersionOf:(UIColor *)color {
}

+ (UIColor *)colorWithFlatVersionFrom:(UIColor *)color {

CGFloat colorAlpha = 0;
[color getLightness:nil valueForA:nil valueForB:nil alpha:&colorAlpha];
//Return flat version with default alpha of 1.0
return [[self class] colorWithFlatVersionOf:color withAlpha:1.0];
return [[self class] colorWithFlatVersionOf:color withAlpha:colorAlpha];
}

+ (UIColor *)colorWithFlatVersionOf:(UIColor *)color withAlpha:(CGFloat)alpha {
Expand Down