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

Simplified arrayOfColorsWithColorScheme #68

Merged
merged 1 commit into from
Oct 8, 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
9 changes: 3 additions & 6 deletions Pod/Classes/Objective-C/NSArray+Chameleon.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,11 @@ + (NSArray *)arrayOfColorsWithColorScheme:(ColorScheme)colorScheme with:(UIColor
//Choose Between Schemes
switch (colorScheme) {
case ColorSchemeAnalogous:
if (isFlatScheme) return [self analogousColorSchemeFromHue:h Saturation:s Brightness:b flat:YES];
else return [self analogousColorSchemeFromHue:h Saturation:s Brightness:b flat:NO];
return [self analogousColorSchemeFromHue:h Saturation:s Brightness:b flat:isFlatScheme];
case ColorSchemeComplementary:
if (isFlatScheme) return [self complementaryColorSchemeFromHue:h Saturation:s Brightness:b flat:YES];
else return [self complementaryColorSchemeFromHue:h Saturation:s Brightness:b flat:NO];
return [self complementaryColorSchemeFromHue:h Saturation:s Brightness:b flat:isFlatScheme];
case ColorSchemeTriadic:
if (isFlatScheme) return [self triadicColorSchemeFromHue:h Saturation:s Brightness:b flat:YES];
else return [self triadicColorSchemeFromHue:h Saturation:s Brightness:b flat:NO];
return [self triadicColorSchemeFromHue:h Saturation:s Brightness:b flat:isFlatScheme];
default:
NSAssert(0, @"Oops! Unrecognized color scheme provided as random color.");
}
Expand Down