How to change the background and text color in the code block?

Summary

I’m trying to change the background and text color of all code blocks to black and white, respectively.

Based on what I’ve read, the only way to do this is to create a custom Preview Theme. I have successfully walked through the online instructions here: [Doc: Create a Theme], but I can’t figure out how make the changes to the code blocks, can someone point me in the right direction?

I’ve even reviewed the CodeMirror doc but haven’t been able to work it out.

Info

  • Platform: macOS
  • Platform version: v10.13.6
  • App Version: v3.22.4 (3.22.4)

Hi Duke,

Happy to help you make a preview theme.
To change the background color of code blocks, please refer to the source code of the default github preview theme: