I was delighted to learn that Eric Bailey, the renowned accessibility expert, has created a set of accessible syntax highlighting themes! The light theme is WCAG AA compliant for colour contrast, while the dark theme is WCAG AAA compliant. Both themes have enhanced support for Windows High Contrast Mode.
I switched to Eric's theme over the weekend; you can see it in action below. The version you see depends on your system preferences.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Accessible syntax highlighting</title>
margin: 1em auto;
<h1>Accessible syntax highlighting</h1>
console.log('Accessible syntax highlighting');