What is the default code block theme?

Hi, random question. What is the default code block theme in Obsidian light mode? I actually quite like it and want to try it in my IDE.

Obsidian uses CodeMirror for syntax highlighting in editing views and Prism in reading view.

Moved to help.

Thanks! Which theme is it using though for those packages?

The default theme is all in the app.css file. See the Obsidian CSS guide.

These are the code properties defined, but the colors will vary depending on what language you define for the code block (and between editing and reading modes, as mentioned above). Maybe what you’re looking for?

body {
  /* Code */
  --code-size: var(--font-smaller);
  --code-background: var(--background-primary-alt);
  --code-normal: var(--text-muted);
  --code-comment: var(--text-faint);
  --code-function: var(--color-yellow);
  --code-important: var(--color-orange);
  --code-keyword: var(--color-pink);
  --code-property: var(--color-cyan);
  --code-punctuation: var(--text-muted);
  --code-string: var(--color-green);
  --code-tag: var(--color-red);
  --code-value: var(--color-purple);

Yep this is exactly what I needed, I did not realize you could open dev tools in Obsidian.
Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.