Rainbow Header Coloring

approved

by albertoos

Color markdown headers (H1-H6) with customizable palettes. Supports colormap cycling and per-level user-defined colors. - This plugin has not been manually reviewed by Obsidian staff.

99 downloadsUpdated 11d agoGPL-3.0

Obsidian Rainbow Header Coloring Plugin

Color your markdown headers (H1–H6) in Obsidian with customizable colors — in both the editor and reading view.


Features

  • Colormap mode — automatically assigns a distinct color to each heading level (H1–H6) from a built-in palette (HSV rainbow, cool, warm, greyscale)
  • User-defined mode — set an explicit font color and background color for each heading level independently, with optional bold and italic
  • Both views — colors apply in Live Preview, Source mode, and Reading view
  • Lightweight — no external runtime dependencies; color generation is built in (~50 lines of math)

Installation

Community plugin directory

  1. Open Obsidian and go to Settings → Community plugins.
  2. Select Browse and search for Rainbow Header Coloring.
  3. Select Install, then Enable.

Manual install (development / testing)

  1. Build the plugin:
    npm install
    npm run build
    
  2. Copy main.js, manifest.json, and styles.css to your vault:
    <Vault>/.obsidian/plugins/rainbow-header-coloring/
    
  3. Reload Obsidian and enable the plugin in Settings → Community plugins.

Settings

Colormap mode

SettingDefaultDescription
Modecolormapcolormap cycles colors automatically; userDefined gives per-level control
ColormaphsvColor palette (hsv, cool, warm, greyscale)
Shades20Number of color steps in the palette (10–40)
Font opacity1.0Opacity of the generated header text color (0.0–1.0)
Background opacity0.1Opacity of the generated header background color (0.0–1.0)
Enable in editortrueApply coloring in Live Preview and Source mode
Enable in reading viewtrueApply coloring in Reading view

User-defined mode

Per heading level (H1–H6):

SettingDefaultDescription
Font colorOne Dark Pro paletteCSS color for the heading text
Background colorOne Dark Pro paletteCSS color for the heading background
Enable backgroundtrueToggle background color on/off per level
BoldfalseMake the heading bold
ItalicfalseMake the heading italic

Development

# Install dependencies
npm install

# Dev build with watch
npm run dev

# Production build
npm run build

# Lint
npm run lint

# Build and install into the test vault
npm run install-test

Test vault

A test-plugin-vault/ directory is included in the repo with 9 markdown files covering all edge cases (code blocks, YAML frontmatter, blockquotes, callouts, inline formatting, etc.). After running npm run install-test, open that folder as an Obsidian vault to do manual QA.

See CHANGELOG for release history.


Credits


License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.