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

Improve High Contrast Compatibility #4

Closed
namazso opened this issue Jun 25, 2021 · 13 comments
Closed

Improve High Contrast Compatibility #4

namazso opened this issue Jun 25, 2021 · 13 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@namazso
Copy link

namazso commented Jun 25, 2021

image

@micwoj92
Copy link
Collaborator

This proves that windows 11 will not have high contrast options.

@rcmaehl rcmaehl self-assigned this Jun 25, 2021
@rcmaehl rcmaehl added the enhancement New feature or request label Jun 25, 2021
@rcmaehl
Copy link
Owner

rcmaehl commented Jun 25, 2021

Thank you! I'll see if I can add a check for high contrast being enabled and swapping the background color. Black is fine right?

@namazso
Copy link
Author

namazso commented Jun 25, 2021

would be better to simply use the current theme's background color instead, so that it works with custom themes too

dunno much about autoit but in C you'd do GetSysColor(COLOR_WINDOW)

rcmaehl added a commit that referenced this issue Jun 25, 2021
@rcmaehl
Copy link
Owner

rcmaehl commented Jun 26, 2021

@namazso I've implemented a similar call. Please try one of the dev builds when you can and let me know if it's any better.

https://github.com/rcmaehl/WhyNotWin11/actions

@namazso
Copy link
Author

namazso commented Jun 26, 2021

It's the exact same.
High contrast:
image
Custom dark theme:
image

@namazso
Copy link
Author

namazso commented Jun 26, 2021

you are setting the default control color to the default window text color, which it already is by default:
https://github.com/rcmaehl/WhyNotWin11/blob/main/WhyNotWin11.au3#L53
What you probably want instead is changing the background colors to
_WinAPI_GetSysColor($COLOR_WINDOW)

rcmaehl added a commit that referenced this issue Jun 26, 2021
ACTUALLY Fix #27
Finish WDDM2 #22
Continue work on #4
@rcmaehl
Copy link
Owner

rcmaehl commented Jun 26, 2021

821ad9c is better but I'll see if I can work on improving it later on

@rcmaehl rcmaehl added this to the 3.0 milestone Jun 26, 2021
@rcmaehl rcmaehl changed the title Borderline unusable in high contrast Improve High Contrast Compatibility Jun 26, 2021
rcmaehl added a commit that referenced this issue Jun 26, 2021
Get #4 working
Add #29, but don't add yet (see issue)
@micwoj92 micwoj92 mentioned this issue Jun 26, 2021
9 tasks
rcmaehl added a commit that referenced this issue Jun 27, 2021
Improve #4, Icons still need High Contrast versions
@namazso
Copy link
Author

namazso commented Jun 27, 2021

Looks to be fine on high contrast:

8ff5c0b:

image

7d60b16:

image

Sad that you broke it custom themes, but whatever i guess they are custom after all, can't expect programs to actually consistently follow the system color scheme, it was easily user-modifiable in Vista last time:

8ff5c0b:

image

7d60b16:

image

@verdy-p
Copy link

verdy-p commented Jul 14, 2021

Even without high contrast, check the "Dark theme" in Windows 10 and 11. Beware of icons filled only with black and fully transparent elsewhere: they won't contrast correctly on the dark barkground of the side.

You should use thre default colors of the windows settings which defines a background color, a foreground color and color for emphasis which should contrast with both.
If you use static background colors (e.g. on green/yellow/red cells showing "OK" or "X" or "?"), the text in the colored cell should be using also a contrasting static color (text in plain white on green or red, but should be full black on yellow/orange).

  • Only text elsewhere on very light or plain white background can use a dark gray color (light theme) or emphasis color (like medium blue or green for active links).
  • Only text elsewhere on very dark or plain black background can use a light gray color (dark theme) or emphasis color (like medium blue or green for active links).
    The two last options are properly configured in the Settings panel, taking into account accessibility. You should not deviate by choosing other colors.

For icons on the lateral side, render them on a contrasting medium colored background, notably because the non transparent parts are plain black. You can safely use the emphasis color, provided that you checked its ligthness is not too dark, otherwise compute a lighter color from the contrasting color (same hue, same saturation level, just make it use at least 50% lightness, suing the HSL color model).

Then check that other text you'll place on this colored lateral panel will contrast enough with this background (ideally that text should be only plain black in the light time, or plain white in the dark theme, like for the rest of the UI

@namazso
Copy link
Author

namazso commented Jul 15, 2021

@verdy-p it seems to use default colors now most of the time, on my custom dark theme it no longer looks like in my previous comment, so thats an improvement:

image

@rcmaehl
Copy link
Owner

rcmaehl commented Jul 15, 2021

@verdy-p it seems to use default colors now most of the time, on my custom dark theme it no longer looks like in my previous comment, so thats an improvement:

image

Part of it is the fact that I have to deal with recoloring the background and recoloring the icon when I know nothing about GDI+. There's individual examples for both but not a single example that does both at the same time that I found in the language that I use. So I'm having to figure out how to have it draw how I want

@verdy-p
Copy link

verdy-p commented Jul 15, 2021

Namaszo: You're wrong, you almost can't see the icons on the left (social network links) and the right (information with the letter i encloded in a circle).

The left part should have a lighter contrasting panel to see the (black) social icons. And the right part using normal background and normal text, should have its (i) icons using the emphasis color (usually blue or green, but never black or white, at top we can see an emphasis using red: generally the emphasis color can have any hue, medium lightness, and high saturation; while te normal background and text colors have very low or very high lightness, but still avoid using excessive contrasting 0% and 100% lightness: e,g. a safe choice is almost-black#222 text on white#FFF for light theme, or almost-white#DDD on black#000 for dark theme; the contrast should be around 80% of difference for normal text with low saturation

If you have high saturation text used for emphasizing texts like active links or warnings/errors, the contrast of lightness with the background may be lower but the foreground and background should have a large enough difference of saturation, so the background should have low saturation, meaning it will be very greyish; and enough difference of lightness, so the emphasing text should be using a medium lightness and the background a very low or very high lightness, in other words the background can only be black or very dark (<20% lighness) in the dark theme, or white or very light (>80% lightness) in the light theme.

For all this, used the HSL color model rather than the RGB model, to compute a suitable accessible palette, even if finally it is converted to sRGB.

The the "high contrast" color theme, the thresholds of differences are higher than just 80%/20%, and you allow full black on full white with 100% difference. But this applies only to the normal text and normal background (that background can only be plain white or plain black).

@namazso
Copy link
Author

namazso commented Jul 15, 2021

@verdy-p i just pointed out the improvement since the closing of the issue, i do know about the remaining problems.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants