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

SVG Color Replacer

mahiron47mahiron47107 downloads

Replaces black color with white in SVG rendered from LaTeX for dark mode compatibility.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates3

A plugin for Obsidian that automatically adapts SVG image and mathematical formula colors to match dark theme styling.

How it works

  1. When a note loads, the plugin finds all SVG elements
  2. For each SVG:
    • Gets the current Obsidian background color
    • Replaces white color with this background color (hides white parts)
    • Replaces black color with white (makes black text visible)
  3. Marks processed elements to avoid re-processing on updates

What gets processed

  • fill, stroke, color attributes
  • Inline styles (CSS inside style="")
  • Text elements (<text>, <tspan>)
  • SVGs in both regular form and encoded in data-URLs

Installation

  1. Copy the plugin folder to .obsidian/plugins/
  2. In Obsidian, open Settings → Community plugins → Reload plugins
  3. Enable the "SVG Color Replacer" plugin
HealthExcellent
ReviewSatisfactory
About
Adapt SVG images and mathematical formula colors to match the active Obsidian theme. Replace white with the background color and black with white across fill, stroke, color attributes, inline styles, text elements, and data-URL SVGs, marking processed elements to avoid reprocessing.
ThemingImagesCSS
Details
Current version
1.0.2
Last updated
9 months ago
Created
9 months ago
Updates
3 releases
Downloads
107
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
mahiron47mahiron47
GitHubmahiron47
  1. Community
  2. Plugins
  3. Theming
  4. SVG Color Replacer

Related plugins

Style Settings

Adjust theme, plugin, and snippet CSS variables.

Auto Card Link

Automatically fetches metadata from a URL and makes it as a card-styled link.

Background Image

Specify a remote URL as the background image, and a few settings to tweak the experience.

Contextual Typography

Add a data-tag-name attribute to all top-level divs in preview mode containing the child's tag name, allowing contextual typography styling.

Minimal Theme Settings

Control the colors and fonts in Minimal Theme.

Hider

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

Share Note

Instantly share/publish a note, with the full theme and content exactly like you see in Obsidian. Data is shared encrypted by default, and only you and the person you send it to have the key.

Admonition

Admonition block-styled content.

Ink

Handwriting and drawing directly between paragraphs using a digital pen, stylus, or Apple pencil.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.