Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

PDF Toggle Dark Mode

Vivek GalatageVivek Galatage908 downloads

Toggle dark/light appearance for PDF viewers and thumbnails.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates19

Obsidian plugin that toggles a dark/light appearance for PDF viewers and sidebar thumbnails. If PDF++ is installed, rectangular cropped embeds are covered too.

Features

  • PDF toolbar controls — dark/light toggle plus Darkness, Color correction, and Brightness sliders and a Find color swatch, mounted on the native PDF toolbar (can be toggled on/off in settings)
  • Ribbon icon — sun (light) / moon (dark), with tooltip for the current mode
  • Status bar item — same toggle plus PDF: Light / PDF: Dark label
  • Command — Toggle PDF dark/light mode (bind a hotkey if you like)
  • Settings — same appearance options (also available from Settings → PDF Toggle Dark Mode)
  • Persistence — mode and appearance settings are saved across restarts
  • Adapt to theme — optional setting so PDF dark/light follows Obsidian’s appearance (and system light/dark when Obsidian is set to adapt to system)
  • Late PDF opens — classes and toolbar controls re-apply when new PDF views mount
  • Find-in-file highlights — in dark mode, only the current PDF Find match is painted (same as Obsidian without the plugin). Fill is translucent so text stays readable; the ring is a darker shade of the same color. Change it from the toolbar swatch or Settings.
  • PDF++ cropped embeds (optional — requires PDF++ installed and enabled) — rectangular clippings (![[file.pdf#page=N&rect=…]], class pdf-cropped-embed) use the same dark/light mode and Darkness / Color / Brightness settings as full PDF viewers. Clicking a crop opens Obsidian’s media lightbox; that popup is inverted only when the image matches a PDF crop (other image lightboxes are left alone). Without PDF++, those embeds are not created, so this feature simply does nothing.

Install (manual / development)

  1. Build:

    npm install
    npm run build
    
  2. Copy or symlink this folder into:

    <vault>/.obsidian/plugins/pdf-toggle-dark-mode/
    

    Required files for Obsidian: main.js, manifest.json, styles.css.

  3. Enable PDF Toggle Dark Mode under Settings → Community plugins.

Usage

Open a PDF. On the PDF viewer toolbar you’ll see:

  1. Sun / moon button — toggle light ↔ dark for PDFs
  2. Dark slider — darkness (only while dark mode is on)
  3. Color slider — color correction (only while dark mode is on)
  4. Bright slider — brightness (only while dark mode is on; 20–200%)
  5. Find color swatch — current Find match color (only while dark mode is on; the ring is a darker shade of this color)

You can also use the ribbon icon, status bar item, or the Toggle PDF dark/light mode command.

Under Settings → PDF Toggle Dark Mode (requires Obsidian 1.13.0+):

Setting What it does Default
Adapt to theme PDF dark/light follows Obsidian (and system if Obsidian adapts to system). Manual toggles still work; the next theme change re-syncs. Off
Show toolbar buttons Show/hide the dark/light mode toggle and appearance controls in the PDF viewer toolbar On
Darkness How strongly light pages turn dark 90%
Color correction Makes charts/photos look natural after darkening 50% (recommended)
Brightness CSS brightness() after darkening (min 20%, max 200%) 100%
Show link outlines Show/hide the outline boxes around clickable PDF links On
Find highlight Color of the current PDF Find match in dark mode. The ring is a darker shade of this color. #ffc400

Each slider has its own Reset control (toolbar: small rotate icon; Settings: Reset darkness / Reset color correction / Reset brightness). The Find swatch has a reset too. Reset appearance restores all three sliders plus link outlines and Find highlight. Settings are searchable from Obsidian’s global settings search. Toolbar controls and Settings stay in sync.

Develop

npm run dev    # watch rebuild
npm run build  # production main.js

Releases and Obsidian Community Plugins

A repo alone is not enough for the official Community plugins browser.

Obsidian installs plugins by downloading assets from a GitHub Release:

Asset Required
main.js yes
manifest.json yes
styles.css yes (this plugin has styles)
  • Community store → needs a published GitHub Release with those files.
  • Just a public repo → fine for source / PRs; users cannot install via Browse unless a Release exists.
  • BRAT / manual install → can use the repo or a local copy without the store.

Automated release (this repo)

  1. Bump versions so they match (example 1.0.1):

    • package.json → "version"
    • manifest.json → "version"
    • (optional) npm version patch runs version-bump.mjs for manifest.json + versions.json
  2. Commit and push main.

  3. Trigger a release in either way:

    A. Tag push

    git tag 1.0.1
    git push origin 1.0.1
    

    B. On-demand (Actions UI)

    GitHub → Actions → Release Obsidian plugin → Run workflow

    • Leave version empty to use manifest.json, or type e.g. 1.0.1 (must match the manifest).
    • draft is on by default; uncheck to publish the Release immediately.
  4. The workflow builds the plugin and creates a GitHub Release with main.js, manifest.json, and styles.css (draft unless you opted out on a manual run). Manual runs also create the git tag from the current commit if it does not exist yet.

  5. If it is a draft: GitHub → Releases → review → Publish release.

Only after a published Release can Obsidian (and the community directory, once your plugin is listed) pick up the version.

License

MIT

HealthExcellent
ReviewPassed
About
Toggle dark and light appearance for PDF viewers and sidebar thumbnails by applying a PDF-specific dark mode. Use the ribbon icon, status-bar item, or command to switch; the chosen mode persists across restarts and re-applies to newly opened PDFs.
PDFAppearanceStatus bar
Details
Current version
1.0.20
Last updated
3 weeks ago
Created
2 months ago
Updates
19 releases
Downloads
908
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Vivek GalatageVivek Galatagevivekgalatage
GitHubvivekgalatage
  1. Community
  2. Plugins
  3. PDF
  4. PDF Toggle Dark Mode

Related plugins

Custom Note Width

Effortlessly change the line width of each note individually. Provides multiple ways to customize the experience, making it both efficient and user-friendly to adjust line widths.

Minimal Theme Settings

Control the colors and fonts in Minimal Theme.

Hider

Hide interface elements such as tooltips, status bar, titlebar, and more.

Supercharged Links

Add attributes to internal links with the values of target note's frontmatter attributes.

Note Toolbar

Add customizable toolbars to your notes.

Karpathy LLM Wiki

Karpathy's LLM Wiki implementation plugin for Obsidian - turns notes and PDFs into a linked, LLM-powered knowledge base with entity pages, concept pages, graph-powered Q&A, and local-first privacy.

Style Settings

Adjust theme, plugin, and snippet CSS variables.

Text Extractor

A (companion) plugin to facilitate the extraction of text from images (OCR) and PDFs.

Annotator

Read and annotate PDFs and EPUB files.

Slides Extended

Create markdown-based reveal.js presentations. Fork of Advanced Slides.