nio icon indicating copy to clipboard operation
nio copied to clipboard

Enabling system wide higher contrast lowers contrast in Nio

Open helmut72 opened this issue 5 years ago • 7 comments

Nio shows low contrast text bubbles, when Dark Mode is enabled.

helmut72 avatar Apr 09 '20 07:04 helmut72

Ah, well that's certainly unfortunate... 🙈 Thanks for the issue! I'll definitely have to validate the current styles in high-contrast mode.

kiliankoe avatar Apr 09 '20 08:04 kiliankoe

Thanks 👍

helmut72 avatar Apr 09 '20 08:04 helmut72

I pushed a new beta with some changes regarding this yesterday. Could you have a look and see if that improves things? Thanks!

kiliankoe avatar Apr 11 '20 19:04 kiliankoe

Yes, just tried it. Thanks, a lot better than before 👍 Maybe it would be even better if text color stays white? More like in iMessage, but with a more colorful bubble?

helmut72 avatar Apr 11 '20 19:04 helmut72

I was thinking the same and would prefer it that way, but right now I'm using SwiftUI's default colors (e.g. Color.purple), which unfortunately doesn't give me access to the actual underlying color to update that. SwiftUI just assumes it knows best when high-contrast-mode is enabled and makes the purple lighter in dark-mode. That's why I opted to change the text color for now.

I'll keep the issue here open, since I'd very much prefer it the other way around as well.

I know @regexident has ranted about the colors before. Maybe he has an idea on how to handle this nicely?

kiliankoe avatar Apr 11 '20 21:04 kiliankoe

Given that SwiftUI's Color essentially makes use of UIKit's UIColor and named Color (e.g. Color.red) maps to its corresponding named UIColor I would just do the color handling in UIColor and then create a Color from it via init(_ color: UIColor).

https://github.com/yannickl/DynamicColor has a bunch of nice methods for modifying colors.

Just make sure to wrap things in UIColor(dynamicProvider:) to ensure things work with dark mode.

regexident avatar Apr 12 '20 21:04 regexident

Ah, that's fantastic!

kiliankoe avatar Apr 12 '20 21:04 kiliankoe