Custom Tag Color

by Anand Baghel
5
4
3
2
1
New Plugin

Description

Define custom text colors (and derived backgrounds) for tags based on regex patterns. - This plugin has not been manually reviewed by Obsidian staff.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
0
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Custom Tag Color

An Obsidian plugin that lets you assign custom colors to tags using regular expression (regex) patterns. Create flexible rules that automatically color tags based on their names, prefixes, numbering schemes, dates, times, emojis, and more.

Features

  • 🎨 Assign custom color to tags.
  • 🔍 Match tags using powerful regular expressions.
  • 📋 First matching rule takes priority.
  • 🌈 Automatically derives complementary background colors.
  • ➕ Add, edit, and remove rules from an intuitive settings panel.
  • ♻️ Reset all rules to the default example configuration.
  • 📱 Works on both desktop and mobile versions of Obsidian.

Examples

Goal Regex Pattern
Match exactly #important ^important$
Match dates like #21/06/2026 ^\d{2}/\d{2}/\d{4}$
Match times like #09:30 ^\d{2}:\d{2}$
Match times like #09-30 ^\d{2}-\d{2}$
Match #war1, #war25, #article10 ^(war|article)\d+$
Match numeric tags ^\d+$
Match tags starting with status- ^status-.*$

Regex Quick Reference

Symbol Meaning
^ Start of text
$ End of text
. Any character
* Zero or more
+ One or more
\d Digit (0-9)
| OR operator

Escape special characters with \\ when necessary.

Installation

From Community Plugins (after approval)

  1. Open Settings → Community Plugins.
  2. Disable Safe Mode if necessary.
  3. Search for Custom Tag Color.
  4. Install and enable the plugin.

Manual Installation

Copy the following files into:

<your-vault>/.obsidian/plugins/custom-tag-color/
  • manifest.json
  • main.js

Then reload Obsidian and enable the plugin in Community Plugins.

Usage

  1. Open Settings → Custom Tag Color.
  2. Click Add New Rule.
  3. Enter a regex pattern (without the leading #).
  4. Choose a color.
  5. Save your changes.
  6. Tags matching the first applicable rule will automatically use the configured color.

Notes

  • Patterns match the tag name only, without the leading #.
  • Rules are evaluated from top to bottom.
  • The first matching rule is applied.

Compatibility

  • Minimum Obsidian version: 1.8.0

Author

Anand Baghel

License

MIT