Anand Baghel210 downloadsDefine custom text colors (and derived backgrounds) for tags based on regex patterns.
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.
| 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-.*$ |
| 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.
Copy the following files into:
<your-vault>/.obsidian/plugins/custom-tag-color/
manifest.jsonmain.jsThen reload Obsidian and enable the plugin in Community Plugins.
#).#.MIT