Changing the purple is Obsidian's default theme

Hi, I want to change the purple in the default Obsidian theme to a different color (or maybe colors).

Can someone provide me with the Custom CSS that I’ll need to change/override the appropriate variables in the default theme which will allow me to experiment with different colors. If the purple is stored as a different variable for each bit of functionality, here are the ones that I’m most interested in:

  1. [[text inside link brackets]]
  2. Button colors in Settings
  3. Generally, any purple lines or accents used in the UI.

Thanks in advance for your help.

P.s. this is my first post, apologies if it’s not inline with the forum’s norms in formatting, style etc.

While not the answer to your question, I’d like to mention @kepano 's plugin Advanced Appearance. It allows you to customise accent and base colours, typography and a few other things.

Thank you!

I will try this out today and confirm whether it proved a viable solution to my problem.

It’s a great plugin. I believe the part that links to my request is:

Advanced Appearance allows users to set an accent color and a base color, using HSL sliders. These HSL values are then mapped to Obsidian’s default CSS color variables. HSL is used because the values can be easily modified using calc() to generate variations of that color.

You can use these variables to compute shades using calc() in your CSS, for example, the code below generates a color that is 10% darker than the base color:

--background-secondary:hsl(var(--base-h),var(--base-s),calc(var(--base-l) - 10%));

You can use this approach to modify the hue and saturation as well.

If anyone can explain the exact steps that need to be taken to change the base color to red, for example, I’d really appreciate it. Specifically, which file to implement the code in and what the exact code should be.


Having played with the plugin, a lot can be achieved by changing the base and accent color settings in the plugin itself.

So, I’ve got exactly what I needed. Thanks!


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