UIImageView-Letters icon indicating copy to clipboard operation
UIImageView-Letters copied to clipboard

Invert label color in some colors.

Open NikKovIos opened this issue 8 years ago • 2 comments

In some light colors like yellow - white label looks bad. What about inverting color to black in such matters?

NikKovIos avatar Jan 04 '17 18:01 NikKovIos

The random color generation is designed in such a way that it tries to prevent making bright background colors, but it could be improved.

Another solution is to roll your own color generation, and use the method: - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular textAttributes:(NSDictionary *)textAttribute

Using that function, you can set color to a yellow color, and set the text color in textAttribute to black.

bachonk avatar Jan 23 '17 15:01 bachonk

I have updated code with contrast ability. You can close an issue.

With contrast.zip

NikKovIos avatar Mar 10 '17 07:03 NikKovIos