All posts
·4 min read

Dark Mode for Markdown Editing: Why It Matters and How to Set It Up

dark modemarkdowneditorproductivity

If you spend hours writing or reading Markdown, the color scheme of your editor matters more than you might think. Dark mode is not just an aesthetic preference. It reduces eye strain in low-light environments, saves battery on OLED screens, and helps you focus on your content.

Quick Answer: A dark mode Markdown editor reduces eye strain by lowering screen brightness contrast, extends battery life by up to 47% on OLED displays, and keeps your focus on the text. Toggle dark mode in edtr.md instantly with no configuration required.

Why Does Dark Mode Matter for Long Writing Sessions?

Reduced eye strain. A bright white screen in a dimly lit room forces your eyes to constantly adjust between the screen and the surrounding darkness. Dark mode reduces this contrast gap.

Better focus. With a dark background, the text becomes the brightest element on screen. Your attention naturally stays on the content instead of the interface chrome.

Battery savings. On OLED and AMOLED displays, dark pixels use less power. A dark-themed editor can extend your laptop or tablet battery life noticeably during long writing sessions.

Consistency with dev tools. Most developers use dark themes in their code editors, terminals, and browsers. A dark Markdown editor fits naturally into that workflow.

What Makes a Good Dark Mode?

Not all dark modes are created equal. A good implementation needs to handle more than just background and text colors.

Syntax Highlighting

Code blocks need a dark-aware color scheme. GitHub’s dark theme colors are widely recognized and work well: purple for keywords, blue for variables, orange for strings, gray for comments.

Diagrams

Mermaid diagrams, Vega-Lite charts, and other visual elements need to adapt. Text labels should be light on dark. Borders and lines should use muted colors that are visible without being harsh.

Scrollbars and UI Elements

System scrollbars often stay light even when the page is dark, creating a jarring visual stripe. A proper dark mode styles scrollbars, selection highlights, and focus rings to match.

Print Output

Dark mode should not affect print or PDF export. When you print a document, it should use light backgrounds and dark text regardless of your editor theme.

How Does Dark Mode Work in edtr.md?

edtr.md includes a GitHub-inspired dark theme that covers every element:

  • Editor pane: dark background with syntax-aware colors for Markdown markup
  • Preview pane: dark prose with adjusted heading, link, and code colors
  • Code blocks: GitHub dark palette for syntax highlighting
  • Mermaid diagrams: automatically render with dark-friendly colors
  • Toolbar and sidebars: consistent dark surfaces throughout
  • Scrollbars: custom styled to match the dark theme

Toggle dark mode with the moon/sun icon in the status bar. Your preference is saved to your browser and persists across sessions.

If you want to compare editors side by side, see our roundup of the best online Markdown editors in 2026 for a full breakdown of dark mode support across tools.

Print Is Not Affected

When you export to PDF or print, edtr.md always uses a light theme with dark text. The document prints with white backgrounds and full-color syntax highlighting, regardless of your editor theme setting.

How Does Dark Mode Compare Across Markdown Editors?

Editor Dark Mode Diagram Adaptation Custom Colors
edtr.md Yes Yes Accent color picker
VS Code Yes N/A Full theme system
Obsidian Yes Partial CSS snippets
StackEdit No N/A N/A
Notion Yes No Limited

Tips for Dark Mode Writing

  • Adjust your room lighting. Dark mode works best with some ambient light. A completely dark room still causes eye strain even with a dark screen.
  • Use a warm color temperature. Combine dark mode with your OS night shift or f.lux for reduced blue light in the evening.
  • Pick a comfortable contrast level. Pure white text (#fff) on pure black (#000) can be harsh. Slightly muted text (like #c9d1d9 on #0d1117) is easier on the eyes.

Try It

Open edtr.md and toggle dark mode in the status bar. Write some Markdown with code blocks and headings to see how the dark theme adapts to every element.

Try it yourself

Open edtr.md and start writing Markdown with live preview, diagrams, math, and PDF export. Free, no sign-up.

Open editor