In dark mode syntax highlighting some text colors are almost impossible to read. See for example the callable identifiers tuple and map here:
It is almost impossible to distinguish the dark color of the text from the grey background. Could you please fix the syntax highlighting color palette? In addition I think it would be much better to make the background color darker.
Agreed, this makes dark mode very difficult to use for me, specifically the color used for builtin functions (print is the most common one, in particular). In order to reliably see it, I end up having to select the text in question, assuming I even notice it at all (and think its just indentation, as has sometimes happened). Is there anyway to customize this?
I’ve noticed this too for a while, but it’s finally gotten to the point where I think we need to do something about it. Dark mode is so much easier on the eyes, but the contrast especially for Python keywords is unreadable. Is this something we can fix in our own instance, and if so, who would be able to make this change?
It sounds like it should be possible to pick a different syntax highlighting theme that would avoid this issue, and potentially override individual colors with CSS.
Oh, @CAM-Gerlach - your response reminds me that it’s not just keywords in Python syntax highlighting, it’s also the choice of low-contrast blue-ish on black for links.
Indeed—ironically, the same thing we both noticed on the new dark theme for the PEPs. I think that color should be configurable from Admin > Customize > Colors.
Hugo, can you check back with the Discourse folks?
The merge announcement at GitHub mentions hljs-builtin-names, which are much better now, but what about hyperlinks? I’ve been making them bolded and often CAPITAL to punch up their visibility.
results = tuple(map(data))
I don’t know if it’s easy or simple to make hyperlinks bold by default in a config file or CSS or something, but that might be a viable option.
The fix hasn’t been released yet: the fix was merged on 18th May, and the last releases (v2.8.3 and v2.9.0.beta4) were on 14th April. If you view the source of the page, you’ll see we’re on 2.9.0.beta4:
<meta name="generator" content="Discourse 2.9.0.beta4 - https://github.com/discourse/discourse version 0fa0094531efc82d9371f90a02aa804b176d59cf">
My topic has since been closed, please can you open a new one at https://meta.discourse.org if there’s more things that need attention? Thanks!
Yes it has, unfortunately. That’s why I asked if you would follow up with Discourse, otherwise I would have created an account and replied in the thread. I only have a test account over there and you’ve already engaged with Sam Saffron and Charlie ‘Chapoi’ about the coloring.
I’ll set up a real account, open a new topic that references yours, and include some @user calls. This should start the new topic off with enough credibility to get some traction.
Before, as mentioned here, the contrast ratio was 1.2. Now it is 2.7 (and still below the minimum AA guidelines are 4.5 and 7.0). I think the fix will bump it to 4.77, but let’s wait for the update.
Hyperlinks
Contrast ratio: 2.69, can be improved. Thanks for opening a topic at Discourse Meta, I’ll comment there too.
Tests-passed:
When a new commit is pushed the to the main branch, our build server automatically runs all our tests against the latest code. Once they all pass the commit is added to our tests-passed branch. This is the branch all Discourse sites run by default.
Beta:
Every few weeks we push the current commits on tests-passed to beta. We use beta as a “milestone” to push out a collection of commits we want more sites to be running and test. We also push a beta if we have an important security fix we want sites to receive. When a beta is pushed all sites running on tests-passed or beta receive the “new update available” email. Sites running tests-passed will update to the current tests-passed commits (including any new commits pushed after the beta), while those on beta will not.