TaskNotes Project Colors

by minorchange
5
4
3
2
1
Score: 35/100

Description

This plugin has not been manually reviewed by Obsidian staff. Automatically colors TaskNotes task cards by project using a deterministic hash-based color scheme.

Reviews

No reviews yet.

Stats

stars
339
downloads
0
forks
1
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

TaskNotes Project Colors

Automatically colors TaskNotes task cards by project. Each project gets a distinct background color and left border, computed from a hash of the project name. Adding a new project requires zero configuration — the color is assigned automatically.

Screenshot

How it works

The plugin watches the DOM for TaskNotes task cards. When a card contains a project link, it:

  1. Reads the project name from the link's data-href attribute
  2. Computes a DJB2 hash of the name
  3. Maps the hash to a hue value (0–359)
  4. Sets a --project-hue CSS custom property on the card

The plugin's stylesheet then applies a tinted background and colored left border using that hue. Both light and dark themes are supported.

Colors appear in all TaskNotes views that render task cards (kanban, task list, agenda).

Customization

To tweak the saturation or lightness of the colors, create a CSS snippet in your vault (Settings → Appearance → CSS snippets) that overrides the defaults:

/* Example: more saturated, slightly darker backgrounds */
.tasknotes-plugin .task-card[style*="--project-hue"] {
    background-color: hsl(var(--project-hue), 70%, 88%);
    border-left: 3px solid hsl(var(--project-hue), 60%, 50%);
}
.theme-dark .tasknotes-plugin .task-card[style*="--project-hue"] {
    background-color: hsl(var(--project-hue), 40%, 15%);
    border-left: 3px solid hsl(var(--project-hue), 50%, 35%);
}

Installation

From Obsidian Community Plugins

  1. Open Settings → Community Plugins → Browse
  2. Search for "TaskNotes Project Colors"
  3. Click Install, then Enable

Manual

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder your-vault/.obsidian/plugins/tasknotes-project-colors/
  3. Place the three files in that folder
  4. Restart Obsidian and enable the plugin in Settings → Community Plugins