Change font color in theme

Hi, I am using the LYT theme and really like it, but want to change the font color of bold fonts, but would like to still get updates for the theme.

Bold is currently yellow, but since I use a dark mode, white would be better for me.

Things I have tried

I tried changing the CSS file in the vault, I tried creating a snippet and then activating it in appearance, I’m a newbie so maybe I did something wrong.

You can put this in a snippet file:

body {
--bold-color: white !important;

Make sure the file is in the .obsidian/snippets/ folder.

Or, you can make a copy of LYT Mode’s theme.css file in .obsidian/themes/LYT Mode/. The css that controls the bold color is on line 299 in the file. It will look like this:

--bold-color: var(--color-yellowish-355);

Change it to this:

--bold-color: white;

Save this copy outside of the LYT Mode folder as a simple css file in .obsidian/themes/. Rename it to Modified LYT Mode.css or something like that.


Thanks man! this is great! Worked perfectly.

1 Like

Question, I defined it as white, but when using light theme obviously white doesn’t work. Is there a way to define it white in dark theme and black in white theme?

I tried using

.theme-dark .body {
–bold-color: white !important;

but it turns them to yellow instead of white, any ideas?

Try doing the following instead:

body.theme-dark {
  --bold-color: white !important;

body.theme-light {
  --bold-color: black !important;
  /* or some other color for light mode */

And if enclosing markdown, queries or other code blocks, please enclose in at least four backticks, to ensure proper formatting.

1 Like

thanks it worked

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.