Posting here because the source topic has been closed.
Hello @sam and @chapoi. Thank you for the speedy response to @hugovk’s report on code highlighting in dark mode. The team over at Python Discourse had also noted the dark forefround color for hyperlinks but this was omitted from the Almost unreadable code highlighting topic here.
You can see that the unbolded hyperlink sort of sinks into a hole…
Could you guys revisit the coloring of hyperlink text in dark mode?
The same shade used for the hljs-builtin-names will probably work well. The message body background color will give it a different shade from the code block text scheme and the color will contrast stronger with the darker message body background.
It’s just a matter of tweaking the shade to get more contrast, Alex. The hyperlinks are slightly dark, so they sink back into the background as shown in the screenshot. A shade level or two is all that it will take.
Bear in mind that Discourse developers and most of the team at Python.org are professionals with much experience in user interface design. These are subtle adjustments. No heavy-handed modifications are being proposed or requested here.
Thank you for the comparisons, @Jonathan_Poyer and @JammyDodger. That’s very helpful. Yes, my hyperlinks also show up better here. I’d say it’s about the exact amount of adjustment that I had in mind. Here’s a screenshot showing the hyperlink and screenshot from the OP here.
As far as I know, we’re running the default CSS setup. The admin group are the Python core development team, so they understandably prefer to focus on administering Python rather than administering Discourse.
They had a discussion about code highlighting that Sam Saffron participated in and Charlie ‘Chapoi’ made the adjustment for the next release. We just forgot to include the topic of the hyperlinks. (Interestingly, the code highlighting is now better over there even though the adjusted release is pending. Perhaps someone found the color assignment and tweaked it.)
At first I thought that discuss.python.org is running a different Discourse build. However, we’re currently running 2.9.0.beta4 and the page element viewer shows the same here:
<meta name="generator" content="Discourse 2.9.0.beta4 - https://github.com/discourse/discourse version 8a58ce6578ab697f29cea211049c37c2ab341ba5">
Do you know where the hyperlink color specification is, by chance?
We now ship an additional high-contrast dark color scheme in core that probably solves your issue. You can try that scheme out here on meta, it is called WCAG Dark.
I do see that scheme is not available on the Python community though (most likely because the community was established before we added the WCAG schemes to core). So, your best bet here is to reach out to the administrators on that site and ask them to enable WCAG color schemes.
Thank you for this. Wow! That’s pretty masterful. Everything is so visible that I actually turned my brightness down! The active post editor at the bottom really makes itself evident. It’s not as prominent in the normal dark theme.
The editor has a bit of a “street neon” underglow, though. You might consider toning it down a notch or two (either darken the hue or add more red/green). Thinning the colored border by one pixel would possibly be ideal but I assume that border thickness isn’t one of the theme parameters.
I’d say that the contrast levels here are pretty well-balanced. The various UI elements also need to contrast with each other.
For example, if hyperlinks are moved too close to the W3C foreground/background contrast ratio, they’ll start to blend into the body text. So the contrast between body text and hyperlink colors is similarly important, especially when it’s short hyperlink text in the center of a paragraph of body text.
@sam and @chapoi, do you know if Discourse Meta’s hyperlink and code highlighting colors have been adjusted off of default here?
It was on 17227e9e53 when I checked the colour palettes, but I noticed it was a few commits behind you so thought I’d update just to be thorough. It’s now on 42683d4874 and still has the same dark theme tertiary colour code (0f82af).