Changing colors of equations

Long story short: if you want to change the colors or anything else of your equations, add the following css to one of your snippets and play with it as you like

.math-block > mjx-container[jax="CHTML"]  {
    font-size: 130%;
    color: orange;
    }

.math-inline > mjx-container[jax="CHTML"]  {
    font-size: 110%;
    color: rgb(217,248,254) !important;
    }
2 Likes

It works for .math-block but not for .math-inline.

This is what works for math inline mode now. Credits to Ricel123 in Reddit:

/* Render Math Inline in Live Preview mode */
.MathJax {
	font-size: 110%;
    color: #A6DA95; /* Green Catppuccin Macchiato */
}

/* Render Math Inline in Reading mode */
.cm-s-obsidian .cm-math {
    font-size: 110%;
    color: #A6DA95 !important; /* Green Catppuccin Macchiato */
}

What css tag should I add if I only want to change the color of bold text inside the math environment? I use \mathbf{variable} for vector variables to change to bold text, and I want to change the color as well for easier readability.

Used it it’s realy good, thanks for the tip ! Though it also changes the color of the math editing vision (source vision), it was convinient to have the contrasting colors to write math expressions. Any idea to color only the final rendering ? (when the cursor’s out of it)

Although it renders very good, thanks again