Help changing color of headers

Hello community. First, I should say that I am new in all this, so sorry if I am doing bad posting in here or any other mistake I make.

I just wanted to know how to change/modify the css file and change color of h1, h2, h3…

I really dont need fancy things, just changing colour for preview and editor mode inside obsidian. Does any of you have simple code to add to the css file to change it?

Thank you!

1 Like

Open obsidian.css and add

h1 { color: blue; }  
h2 { color: red; }
h3 { color: cyan; }

now you’ve changed the headers to blue red and cyan effectively. You can also use a hex code such as #fafafa

9 Likes

Wow, as easy as this, is incredible. When I read your response I confirmed my thoughts: I am a complete newbie.

Anyway, thank you very much, this will be really valuable to me.

No worries, I’m glad I could help. We’re all newbies at some point :slight_smile: there’s plenty of resources on the internet to learn CSS.

I’d recommend https://www.freecodecamp.org/learn they have a good run down of CSS.

2 Likes

Did anyone else get the problem of h6 not changing color from h5? It remains the same color :frowning:

Where to find the file Obsidian.css?

Thanks

The obsidian.css file is a legacy file. The better way to inject css to override the master css would be using the snippets.

I have found this video tutorial to be very helpful.

5 Likes

Thanks, @Antmaker!

1 Like