Skip to content

Instantly share code, notes, and snippets.

@hegemanjr
Last active January 7, 2025 10:44
Show Gist options
  • Save hegemanjr/83138e8174590fc0a0b43ead7e9cd854 to your computer and use it in GitHub Desktop.
Save hegemanjr/83138e8174590fc0a0b43ead7e9cd854 to your computer and use it in GitHub Desktop.
Obsidian Custom Heading Colors

Here is a CSS snippet for Obsidian to customize heading colors in the default theme where the headings are all the same color. This will help provide some contrast between the headings, without being too obnoxious.

Dark Theme

Element Color
H1 #7fbbb3 #7fbbb3
H2 #83c092 #83c092
H3 #83c092 #a7c080
H4 #83c092 #dbbc7f
H5 #83c092 #e69875
H6 #83c092 #e67e80

Light Theme

Element Color
H1 #5a93a2 #5a93a2
H2 #569d79 #569d79
H3 #899c40 #899c40
H4 #bf983d #bf983d
H5 #f57d26 #f57d26
H6 #f85552 #f85552

Usage

File Placement

Place custom-header-colors.css file in your vault's snippets folder .obsidian/snippets.

Activation

  1. Open settings
  2. Click the "Appearance" tab
  3. Activate "custom-header-colors"

image

:root {
--faded-blue: #7fbbb3;
--faded-aqua: #83c092;
--faded-green: #a7c080;
--faded-yellow: #dbbc7f;
--faded-orange: #e69875;
--faded-red: #e67e80;
--faded-purple: #B99CD6;
--light-blue: #5a93a2;
--light-aqua: #569d79;
--light-green: #899c40;
--light-yellow: #bf983d;
--light-orange: #f57d26;
--light-red: #f85552;
--light-purple: #A150F2;
}
.theme-dark
{
--h1-color: var(--faded-blue);
--h2-color: var(--faded-aqua);
--h3-color: var(--faded-green);
--h4-color: var(--faded-yellow);
--h5-color: var(--faded-orange);
--h6-color: var(--faded-red);
}
.theme-light
{
--h1-color: var(--light-blue);
--h2-color: var(--light-aqua);
--h3-color: var(--light-green);
--h4-color: var(--light-yellow);
--h5-color: var(--light-orange);
--h6-color: var(--light-red);
}
@immeralleine
Copy link

thankyou

@xmaxrayx
Copy link

xmaxrayx commented Jan 7, 2025

thx <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment