Closed tsilva closed 9 years ago
@tsilva why not use a single method with negative values for darker ?
- (UIColor *)darkerByPercentage:(CGFloat)percentage {
[self lighterByPercentage:percentage * -1.0];
}
need to put the MAX
call also on the lighter method of course
@joamag makes sense, it could be called colorWithBrightness:(CGFloat)percentage
@tsilva it should keep the same name it's still a delta and not a absolute operation (lighter makes sense)
ok
Description
It's sometimes helpful to be able to programatically retrieve a dark or a lighter version of a color. These are good candidates for category methods. Here is an example: