HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

Dark theme issues

Open Symbai opened this issue 2 years ago β€’ 18 comments

  1. WPF's GridSplitter is not themed image
  2. Selected/Active TabControl header foreground color is probably too dark. Its kinda hard to read. I think it would be better if its get the light blue color background as in bottom right (Title4) but as foreground image

Nuget version: 3.2.0 but you can also repro in master branch.

Symbai avatar Oct 17 '21 18:10 Symbai

@ghost1372 what do you think?

NaBian avatar Oct 18 '21 12:10 NaBian

If I propose my point of vue : I have the same feeling concerning the dark mode, color are too saturated (not sure that the right word πŸ˜…). The most obvious exemple is to read the code example in the demo : image

In design, if you have a dark mode, color are useally less saturated (here again not sure of the word), like pastel. The goal is to have less agressiv colors for the user. Here an extreme exemple : image image

Yopler avatar Oct 18 '21 13:10 Yopler

@NaBian do you have a design system for Handy Control ?

Yopler avatar Oct 18 '21 13:10 Yopler

hmm.... how about this? Untitled

or this Untitled2

ghost1372 avatar Oct 18 '21 13:10 ghost1372

@NaBian do you have a design system for Handy Control ?

look here https://ant.design/components/tabs/

ghost1372 avatar Oct 18 '21 13:10 ghost1372

Nice, You use ant design ! For Dark Mode, look https://ant.design/docs/spec/dark#Design-Principles. You can try the level 8 of the color ! like the blue-8 : #65b7f3

Of course, you don't need to have the same color as Ant Design. But in that case, I think you need to have a Graphic Charter. πŸ˜„πŸ˜‰

Yopler avatar Oct 18 '21 13:10 Yopler

If I propose my point of vue : I have the same feeling concerning the dark mode, color are too saturated (not sure that the right word πŸ˜…). The most obvious exemple is to read the code example in the demo : image

In design, if you have a dark mode, color are useally less saturated (here again not sure of the word), like pastel. The goal is to have less agressiv colors for the user. Here an extreme exemple : image image

update latest code, and you will see: image

NaBian avatar Oct 18 '21 14:10 NaBian

@NaBian can we change PrimaryBrush (Dark theme) for all controls? or we should only change for tabcontrol?

ghost1372 avatar Oct 18 '21 14:10 ghost1372

for all controls, of course, while we should use blue-6 not blue-8 1634568898(1)

NaBian avatar Oct 18 '21 14:10 NaBian

for all controls, of course, while we should use blue-6 not blue-8 1634568898(1) They do not differ muchπŸ˜• Untitled

ghost1372 avatar Oct 18 '21 15:10 ghost1372

we don't have designers. let's do what they say πŸ˜† .

NaBian avatar Oct 18 '21 15:10 NaBian

hmm.... how about this?

Much better thank you. This was also a possible solution I thought of since the selected tab is underlined. I also thought about reporting the watermark of textboxes is hard to read. But I figured out it is also on light/white mode hard to read. In my opinion it could be the same color as the disabled textbox (disabled textbox is still different because the of the different border color).

Symbai avatar Oct 18 '21 17:10 Symbai

update latest code, and you will see: image

Oh Beautiful 🀩 But the fact is that you have only change the color of the Code (https://github.com/HandyOrg/HandyControl/tree/master/src/Shared/HandyControlDemo_Shared/Resources/xshd) But not for the whole dark mode !

Yopler avatar Oct 19 '21 07:10 Yopler

for all controls, of course, while we should use blue-6 not blue-8 1634568898(1)

Here folowing rule for contrast in design. It is here call for web but it can apply to software because this rules apply for any computer screen. Here your contrast is 4.38 . That's a little low πŸ˜…

Web Content Accessibility Guidelines (WCAG) : Regarding colors, the standard defines two levels of contrast ratio: AA (minimum contrast) and AAA (enhanced contrast). The level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (at least 18pt) or bold text. The level AAA requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text or bold text.

Yopler avatar Oct 19 '21 07:10 Yopler

I was using a color contrast checker to test the colors blue-6 and blue-8 : Here the blue-8 : image

and here the blue-6 : image

my point here, is that color used in color.xaml and colorDark.xaml are the same :

  • PrimaryColor : #326cf3
  • Danger color : #db3340
  • Warning color : #e9af20
  • Info Color : #e9af20
  • SuccessCOlor : #2db84d

Background color like for button can stay the same but text color should change to follow contrast rule. Here for Tab you use the PrimaryColor and not the PrimaryTextColor.

Yopler avatar Oct 19 '21 08:10 Yopler

level 8 color is good for tabs but not good for datagrid

level 8 image

But level 7 looks good

level 7

image

ghost1372 avatar Oct 19 '21 15:10 ghost1372

level 8 color is good for tabs but not good for datagrid

level 8 image

But level 7 looks good

level 7

image

Yes , that what I was explaining. The color contrast is is about Text on background ! The fact here, is that the Tab is Text and you use a background color. In your datagrid , the constrast is wrong because your blue-8 is your background (was text color / foreground in Tab) and your text is White

Yopler avatar Oct 19 '21 15:10 Yopler

When I got a little of time, I can try to make a figma for a graphic charter. It is not my profession, i have already done it sometimes for personnal project and for fun. I can try πŸ€”πŸ€·β€β™‚οΈ

Yopler avatar Oct 19 '21 15:10 Yopler