Skip to content

Commit

Permalink
Fixes vicc#53
Browse files Browse the repository at this point in the history
  • Loading branch information
bre7 committed Sep 26, 2015
1 parent 32dcd0d commit a3793a7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Pod/Classes/Objective-C/UIColor+ChameleonPrivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,13 @@ - (BOOL)getLightness:(CGFloat *)L valueForA:(CGFloat *)A valueForB:(CGFloat *)B
CGFloat Y = [XYZValues[1] floatValue];
CGFloat Z = [XYZValues[2] floatValue];

//Run our new XYZ values through our LAB algorithm to convert them into LAB values
NSArray *LABValues = [self arrayOfLABValuesForX:X Y:Y Z:Z alpha:alpha1];
*L = [LABValues[0] floatValue];
*A = [LABValues[1] floatValue];
*B = [LABValues[2] floatValue];
if (L != nil && A != nil && B != nil) {
//Run our new XYZ values through our LAB algorithm to convert them into LAB values
NSArray *LABValues = [self arrayOfLABValuesForX:X Y:Y Z:Z alpha:alpha1];
*L = [LABValues[0] floatValue];
*A = [LABValues[1] floatValue];
*B = [LABValues[2] floatValue];
}

return YES;
}
Expand Down

0 comments on commit a3793a7

Please sign in to comment.