saschaleib / dokuwiki-template-ad-hominem

A lightweight and very flexible template for Dokuwiki. Supports user-side dark mode, is fully accessible and has a high-quality print mode. More info:
https://www.dokuwiki.org/template:ad-hominem
GNU General Public License v2.0
20 stars 4 forks source link

Code highlighter: insufficient colour contrast #53

Open saschaleib opened 1 week ago

saschaleib commented 1 week ago

Some of the default colours by the code highlighter have insufficient contrast.

Example (light mode): image

The situation is only slightly better in dark mode: image

These colours are hard-coded in the DokuWiki core. As it would probably not make much sense to add them all to the configurable colours, they should be overridden in the template to work with the default colours at least.

saschaleib commented 1 week ago

After the changes in the pending pull request, the same elements will look like this: image

Dark mode: image

All colours have been tested to have a contrast ratio of at least 4.5:1 against the default background.