~sircmpwn/sr.ht-discuss

2 2

Contrast issues with new dark theme

Details
Message ID
<20201216022138.nmzsashfwiallwci@rkumar-dekstop.attlocal.net>
DKIM signature
pass
Download raw message
(Disclosure: I don't have a rigorous background in design or 
accessibility)

First of all, thanks for implementing a dark theme! For photosensitive 
users like me, dark themes are closer to a necessity than a preference.

That being said, I'm not quite ready to turn off my custom stylesheet 
for one reason: text in the light-grey rectangles has poor contrast. 
Most contrast calculators are flawed; see this really interesting 
discussion on the WCAG's issue tracker for more: 
https://github.com/w3c/wcag/issues/695

Additionally, several contrast tools use "dumb metrics" that ignore 
context. Font characteristics like weight, size, and density are an 
important part of readability for people with poor color vision. Rob 
Pike's article on color blindness helps explain some of the nuance:
https://commandcenter.blogspot.com/2020/09/color-blindness-is-inaccurate-term.html

Since Sourcehut sets its font to "sans-serif" (good choice), it's not in 
control of the font being displayed; this means it needs to be extra 
conservative wrt color palettes.

Google's Chromium Devtools' nightly builds recently introduced an 
experimental mode that allows switching from the old contrast metrics 
ans AAA criteria to a Advanced Perceptual Contrast Algorithm (APCA). 
While it's certainly not a silver bullet, it's far better than its 
predecessors; it also takes into account font weight/size. Of course, I 
wouldn't recommend using it until it lands in Ungoogled-Chromium ;)

I would suggest making the light grey rectangles darker than the 
standard background, rather than lighter.

Current dark theme (poor contrast):
https://seirdy.one/misc/contrast_before.png

Altered dark theme (good contrast):
https://seirdy.one/misc/contrast_after.png

The above screenshots were a quick job; I didn't spend a lot of time 
fine-tuning the color.

If this sounds like a good idea, I could spend a bit of time to pick a 
better color and send a patch this weekend.

-- 
/Seirdy
Details
Message ID
<C7UB5TNC1I90.1R4182C2AH21G@taiga>
In-Reply-To
<20201216022138.nmzsashfwiallwci@rkumar-dekstop.attlocal.net> (view parent)
DKIM signature
pass
Download raw message
Just finished pushing a round of dark theme improvements which addresses
these concerns. Thanks for the feedback!
Details
Message ID
<20201216175513.fbqnrmaspwseds5i@rkumar-dekstop.attlocal.net>
In-Reply-To
<C7UB5TNC1I90.1R4182C2AH21G@taiga> (view parent)
DKIM signature
pass
Download raw message
On Wed, Dec 16, 2020 at 03:18:01PM +0000, Drew DeVault wrote:
>Just finished pushing a round of dark theme improvements which addresses
>these concerns. Thanks for the feedback!

Awesome; looks much better. You have successfully gotten me to disable 
my userstyle!

Thanks for giving Sourcehut such good accessibility.

-- 
/Seirdy
Reply to thread Export thread (mbox)