Skip to main content
Coding Theme

Moonlight for Obsidian

Moonlight by kartik-karz is an Obsidian theme with dark and light modes and 36.3K downloads.

Preview

Theme preview

An Obsidian window rendered with this theme’s palette.

Obsidian desktop preview

Syntax colors, highlights, links, tags, and checkboxes use this theme's palette; window chrome and layout follow Obsidian's default stylesheet.

Install

Install in Obsidian

  1. Open Settings → Appearance → Themes, then Manage.
  2. Search for “Moonlight” and install it. Obsidian keeps community themes updated.
  3. Or create the folder below and save both theme.css and manifest.json in it, then reload Obsidian.
Theme folder
.obsidian/themes/Moonlight/theme.css
.obsidian/themes/Moonlight/manifest.json

Colors

Palette

Colors extracted from the theme stylesheet.

Dark

Background#202020
Secondary background#161616
Border#333333
Text#dcddde
Muted text#888888
Text accent#5c73f2
Accent background#5c73f2
Selection background#007aff33
Highlight background#5cd6f296

Light

Background#ffffff
Secondary background#f2f3f5
Border#dddddd
Text#2e3338
Muted text#888888
Text accent#5c73f2
Accent background#5c73f2
Selection background#007aff26
Highlight background#5cd6f296

Contrast — Dark

A neutral, muted dark palette anchored on #202020, pairing note text (#DCDDDE) at 11.97:1 (AAA). 3 of 7 graded roles clear WCAG AA (4.5:1+); Faint (#555555, 2.18:1), Accent (#5C73F2, 4.02:1), Highlight (#DCDDDE, 2.85:1), and On accent (#DCDDDE, 2.97:1) sit below 4.5:1 for softer contrast.

Background

#202020

  • Notethe note text on this background
  • Mutedsecondary labels and metadata
  • Fainthints and placeholders
  • Accentlinks and highlighted text
  • Selectiontext inside a selection
  • Highlighthighlighted text
  • On accenta button label on the accent color
Appearance
Dark
Temperature
Neutral
Saturation
Muted
  • Note

    #DCDDDE

    11.97:1AAA

  • Muted

    #888888

    4.59:1AA

  • Faint

    #555555

    2.18:1Fail

  • Accent

    #5C73F2

    4.02:1Fail

  • Selection

    #DCDDDEon #007AFF33

    9.61:1AAA

  • Highlight

    #DCDDDEon #5CD6F296

    2.85:1Fail

  • On accent

    #DCDDDEon #5C73F2

    2.97:1Fail

AA is 4.5:1 for normal text, 3:1 only for large text (at least 24px, or 18.7px bold). AAA is 7:1 (4.5:1 for large text). Code and terminal text are normal text, so anything under 4.5:1 fails.

Note text, headings, links, code, selection, highlight, and accent text are graded on the surfaces they use. Code uses code-background; selection and highlight paint the normal text color on those backgrounds. Colors the theme leaves unset come from Obsidian's default theme and are not graded. Not set here: Code.

Contrast — Light

A neutral, muted light palette anchored on #FFFFFF, pairing note text (#2E3338) at 12.75:1 (AAA). 3 of 7 graded roles clear WCAG AA (4.5:1+); Muted (#888888, 3.54:1), Faint (#999999, 2.84:1), Accent (#5C73F2, 4.04:1), and On accent (#F2F2F2, 3.61:1) sit below 4.5:1 for softer contrast.

Background

#FFFFFF

  • Notethe note text on this background
  • Mutedsecondary labels and metadata
  • Fainthints and placeholders
  • Accentlinks and highlighted text
  • Selectiontext inside a selection
  • Highlighthighlighted text
  • On accenta button label on the accent color
Appearance
Light
Temperature
Neutral
Saturation
Muted
  • Note

    #2E3338

    12.75:1AAA

  • Muted

    #888888

    3.54:1Fail

  • Faint

    #999999

    2.84:1Fail

  • Accent

    #5C73F2

    4.04:1Fail

  • Selection

    #2E3338on #007AFF26

    10.50:1AAA

  • Highlight

    #2E3338on #5CD6F296

    9.25:1AAA

  • On accent

    #F2F2F2on #5C73F2

    3.61:1Fail

Note text, headings, links, code, selection, highlight, and accent text are graded on the surfaces they use. Code uses code-background; selection and highlight paint the normal text color on those backgrounds. Colors the theme leaves unset come from Obsidian's default theme and are not graded. Not set here: Code.