File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1082,13 +1082,19 @@ - (UIColor *)highlightedColorWithColor:(UIColor *)color
10821082 if (numComponents == 2 ) {
10831083 [color getWhite: &brightness alpha: &alpha];
10841084 brightness += brightness > 0.5 ? -adjustment : adjustment * 2 ; // emphasize lighten adjustment value by two
1085+ if (alpha < 0.5 ) {
1086+ alpha += adjustment;
1087+ }
10851088 return [UIColor colorWithWhite: brightness alpha: alpha];
10861089 }
10871090
10881091 // RGBA
10891092 [color getHue: &hue saturation: &saturation brightness: &brightness alpha: &alpha];
10901093 brightness += brightness > 0.5 ? -adjustment : adjustment * 2 ;
1091-
1094+ if (alpha < 0.5 ) {
1095+ alpha += adjustment;
1096+ }
1097+
10921098 return [UIColor colorWithHue: hue saturation: saturation brightness: brightness alpha: alpha];
10931099}
10941100
You can’t perform that action at this time.
0 commit comments