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

Commit

Permalink
Merge pull request #69 from wimbledon/colorWithFlatVersionFrom
Browse files Browse the repository at this point in the history
Fixed colorWithFlatVersionFrom: sets colors with alpha = 0
  • Loading branch information
bre7 committed Oct 9, 2015
2 parents c891546 + 51640ed commit 270002f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Pod/Classes/Objective-C/UIColor+Chameleon.m
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ + (UIColor *)colorWithFlatVersionOf:(UIColor *)color {
+ (UIColor *)colorWithFlatVersionFrom:(UIColor *)color {
CGFloat colorAlpha = 0;
[color getLightness:nil valueForA:nil valueForB:nil alpha:&colorAlpha];
colorAlpha = colorAlpha > 0.0 ? colorAlpha : 1.0;
//Return flat version with default alpha of 1.0
return [[self class] colorWithFlatVersionOf:color withAlpha:colorAlpha];
}
Expand Down

0 comments on commit 270002f

Please sign in to comment.