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

mahiron47mahiron4728 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
80%
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
7 months ago
Created
7 months ago
Updates
3 releases
Downloads
28
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.

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.

Image Converter

Convert, compress, resize, annotate, markup, draw, crop, rotate, flip, align, drag-resize, rename with variables, and batch process images: WEBP, JPG, PNG, HEIC, TIF

Image Context Menus

Image context menus (mostly on right click): Copy to clipboard, Open in default app, Show in system explorer, Reveal file in navigation, Open in new tab.

PlantUML

Generate PlantUML diagrams.

Lapel

Show the heading levels in the gutter of the editor.

CSS Editor

Edit CSS snippet files.