Aditya282 downloadsAutomatically apply semantic colors to LaTeX and MathJax equations in Obsidian Markdown.
Automatically apply beautiful, semantic colors to LaTeX and MathJax equations in Obsidian Markdown.
Obsidian Color Math dynamically transforms plain monochrome equations into rich, readable mathematical expressions. It operates seamlessly across both Live Preview and Reading View, with support for dynamic real-time coloring and permanent Markdown exports.

Rendered MathJax equations displayed with signature Tokyo Night semantic color roles.
[!TIP] 100% Local, Pure TypeScript & Zero Dependencies: Color Math runs completely offline on Desktop and Mobile (iOS & Android). It makes zero network requests, collects no telemetry, and requires no external tools or AI services.
[!NOTE] Looking for the Python CLI & Library? Check out python-color-math (
pip install python-color-math) to colorize equations in batch scripts, terminal pipelines, Jupyter notebooks, or Quarto documents without needing Obsidian open!
tex2chtml and tex2svg). Rendered equations in Live Preview and Reading View appear in full color automatically without altering your raw notes!$...$) and display blocks ($$...$$).\begin{cases}): Full multi-branch recognition with condition alignment (&) and relations (\ge, \le, \ne, <, >).=, \cdot, spacing) so equations never wash out on light backgrounds.1.064\, \mu m, 10 m/s, 500 nm, 50 kg) from algebraic variables, with a dedicated "Natural Color" option to keep units uncolored if desired.dx, dt, d\theta) and derivative fractions (\frac{d}{dx}, \frac{df}{dx}, \frac{\partial \psi}{\partial t}) so calculus operators stay unified, while preserving standalone distance $d$.|\psi\rangle), bras (\langle\phi|), and brackets (\langle\phi|\psi\rangle, \langle\psi|\hat{H}|\psi\rangle), keeping delimiters cleanly styled.Re, Ma, Pr, Nu), while preserving separated variables (R e) as distinct entities.Click the Color Math palette icon on the left ribbon to access quick actions:
\textcolor{...}{...} wrappers into all math blocks and inline math in your note.Open the Command Palette (Ctrl+P or Cmd+P) and search for:
Color Math: Bake colors into note (Permanent)Color Math: Clean baked colors from noteColor Math: Bake colors into current math blockColor Math: Clean baked colors from current math blockColor Math: Bake colors into selectionColor Math: Clean baked colors from selection| Setting | Description | Default |
|---|---|---|
| Live rendered math coloring | Automatically colorizes MathJax equations without modifying raw Markdown. | Enabled |
| Real-time editor syntax highlighting | Live syntax highlighting inside the CodeMirror editor as you type. | Disabled |
| Rainbow delimiters | Colors nested brackets, parentheses, and braces by depth. | Enabled |
| Mathematical symbol taxonomy | Categorizes constants, parameters, functions, and bound indices. | Enabled |
| Color physical units | Highlights physical units (\mu m, m/s, nm) or leaves them in natural theme font. |
Enabled |
| Calculus differentials & derivatives | Highlights differentials (dx, dt) and derivative operators. |
Enabled |
| Quantum bra-ket notation | Highlights Dirac state vectors and brackets. | Enabled |
| Engineering dimensionless numbers | Recognizes unified numbers (Re, Ma, Pr). |
Enabled |
| Variable data-flow hashing | Hashes unique variables to distinct colors across expressions. | Disabled |
| Auto-adapt for light / dark mode | Adjusts operator contrast dynamically on light themes. | Enabled |
| Auto-match on theme change | Re-extracts colors whenever you change your Obsidian theme. | Disabled |
Color Math.main.js, manifest.json, and styles.css from the latest release.color-math inside <vault>/.obsidian/plugins/.Feedback, questions, and feature requests are very welcome!
npm install
npm run build # Builds production main.js
npm run test # Runs Vitest test suite (97/97 passing)
npm run dev # Watch mode with inline sourcemaps
Released under the MIT License.