Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert label color in some colors. #23

Open
NikKovIos opened this issue Jan 4, 2017 · 2 comments
Open

Invert label color in some colors. #23

NikKovIos opened this issue Jan 4, 2017 · 2 comments

Comments

@NikKovIos
Copy link

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

@bachonk
Copy link
Owner

bachonk commented Jan 23, 2017

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.

@NikKovIos
Copy link
Author

NikKovIos commented Mar 10, 2017

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

With contrast.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants