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

Default colors should adapt to macOS Mojave dark mode #3742

Open
sbenitezb opened this issue Nov 11, 2018 · 4 comments
Open

Default colors should adapt to macOS Mojave dark mode #3742

sbenitezb opened this issue Nov 11, 2018 · 4 comments

Comments

@sbenitezb
Copy link

What did you do?

Rendered a chart under dark mode in Mojave.

What did you expect to happen?

Labels, grids, etc, to show in white color.

What happened instead?

Labels, grids, etc, show in black.

Charts Environment

Charts version/Branch/Commit Number:master
Xcode version:10.1
Swift version:4.2
Platform(s) running Charts:macOS
macOS version running Xcode:10.14.1 Mojave

@liuxuan30
Copy link
Member

welcome a PR. We don't have the man power for the fancy features.

@sbenitezb
Copy link
Author

welcome a PR. We don't have the man power for the fancy features.

Fancy? A chart library has to look good and legible. Black text over a dark background makes it useless for presenting information. You can’t read numbers or labels. I agree that you don’t have the man power, but this is no fancy feature, it’s just how things are now that we have a dark mode, like it or not. Mojave brought semantic colors. Charts should use that.

Anyway, I’ll see what I can do.

@liuxuan30
Copy link
Member

OK. Maybe not the right word.. cause this is for iOS mainly, not sure how often it's used in macOS.

@Jean-Daniel
Copy link

Jean-Daniel commented Dec 3, 2018

Replacing NSUIColor.black by NSUIColor.labelColor for default text color should solve most of the color issues.

The grid color is less an issue. Gray still looks good on a dark background.

And please, don't use white color or any non semantic value. Label color automatically switch to the right value depending the display mode, so it does not require any extra work.

If you need to use specific colors for light and dark modes, you really should define them in a Asset catalog and reference them by name in the code, so they also will benefit from automatic adjustment as the display mode change.

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

No branches or pull requests

3 participants