SVG Color Replacer

by mahiron47
5
4
3
2
1
Score: 35/100

Description

This plugin has not been manually reviewed by Obsidian staff. Replaces black color with white in SVG rendered from LaTeX for dark mode compatibility.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
1
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

SVG Color Replacer Plugin

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