The Obsidian color palette defines a range of colors used in the app.

Base colors

The base colors is a neutral color palette ranging from light to dark. These values should typically only be defined by themes.

VariableDefault value (light mode)Default value (dark mode)
--color-base-00#ffffff#1e1e1e
--color-base-05#fcfcfc#212121
--color-base-10#fafafa#242424
--color-base-20#f6f6f6#262626
--color-base-25#e3e3e3#2a2a2a
--color-base-30#e0e0e0#363636
--color-base-35#d4d4d4#3f3f3f
--color-base-40#bdbdbd#555555
--color-base-50#ababab#666666
--color-base-60#707070#999999
--color-base-70#5a5a5a#bababa
--color-base-100#222222#dadada

Accent color

The accent color is used to draw attention to interactive elements, such as links and primary buttons, and can be overridden by the user under Settings โ†’ Appearance in the Obsidian app.

VariableDefault valueDescription
--accent-h254Accent hue
--accent-s80%Accent saturation
--accent-l68%Accent lightness

Tip

You can use CSS calculations to create a variety of shades based on the accent color.

Extended colors

Extended color variables define the broader range of colors used for status messages (errors, warnings, success), callouts, syntax highlighting, graph nodes, and Canvas elements.

Each extended color has an additional RGB variable with a -rgb suffix that you can use to create colors with opacity, using the rgba function.

For example, the following snippet uses the default variable to set the text color, and the RGB variable to set a background color to red with 20% opacity.

color: var(--color-red);
background-color: rgba(var(--color-red-rgb), 0.2);
VariableDefault value (light mode)Default value (dark mode)
--color-red#e93147#fb464c
--color-orange#ec7500#e9973f
--color-yellow#e0ac00#e0de71
--color-green#08b94e#44cf6e
--color-cyan#00bfbc#53dfdd
--color-blue#086ddd#027aff
--color-purple#7852ee#a882ff
--color-pink#d53984#fa99cd
--color-red-rgb233, 49, 71251, 70, 76
--color-orange-rgb236, 117, 0233, 151, 63
--color-yellow-rgb224, 172, 0224, 222, 113
--color-green-rgb8, 185, 7868, 207, 110
--color-cyan-rgb0, 191, 18883, 223, 221
--color-blue-rgb8, 109, 2212, 122, 255
--color-purple-rgb120, 82, 238168, 130, 255
--color-pink-rgb213, 57, 132250, 153, 205

Black and white

Black and white colors let you create masks with opacity.

VariableDefault value (light mode)Default value (dark mode)
--mono-rgb-0255, 255, 2550, 0, 0
--mono-rgb-1000, 0, 0255, 255, 255

Warning

Avoid changing the value of black and white variables.

Semantic colors

Semantic colors are derived from the base color palette based on their intended use.

Surface colors

Primary background
Alt. primary background
Secondary background
Alt. secondary background
VariableDescription
--background-primaryPrimary background
--background-primary-altBackground for surfaces on top of primary background
--background-secondarySecondary background
--background-secondary-altBackground for surfaces on top of secondary background
--background-modifier-hoverHovered elements
--background-modifier-active-hoverActive hovered elements
--background-modifier-borderBorder color
--background-modifier-border-hoverBorder color (hover)
--background-modifier-border-focusBorder color (focus)
--background-modifier-error-rgbError background, RGB value
--background-modifier-errorError background
--background-modifier-error-hoverError background (hover)
--background-modifier-success-rgbSuccess background, RGB value
--background-modifier-successSuccess background
--background-modifier-messageMessages background
--background-modifier-form-fieldForm field background

Interactive colors

VariableDescription
--interactive-normalBackground for standard interactive elements
--interactive-hoverBackground for standard interactive elements (hover)
--interactive-accentBackground for accented interactive elements
--interactive-accent-hslBackground for accented interactive elements in HSL
--interactive-accent-hoverBackground for accented interactive elements (hover)

Text colors

Text foreground colors

VariableDescription
--text-normalNormal text
--text-mutedMuted text
--text-faintFaint text
--text-on-accentText on accent background when accent is dark
--text-on-accent-invertedText on accent background when accent is light
--text-successSuccess text
--text-warningWarning text
--text-errorError text
--text-accentAccent text
--text-accent-hoverAccent text (hover)

Text background colors

VariableDescription
--text-selectionSelected text background
--text-highlight-bgHighlighted text background

Caret color

Defines the color of the caret, the blinking text entry cursor.

VariableDescription
--caret-colorCaret color