
Graph Colorize
Configure Obsidian graph colors by tag, folder, category, or visibility by updating...
Install
npx skills add Ar9av/obsidian-wiki --skill graph-colorize -g -a claude-code -y- Repository
- Ar9av/obsidian-wiki3.6k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 1,945 tokens
- Runs scripts
- No, instructions only
What it does
Configure Obsidian graph colors by tag, folder, category, or visibility by updating .obsidian/graph.json. Use for graph colorization; preserve other graph settings and back up before changes.
Graph Colorize, Color-code the Obsidian Graph View
You are rewriting $OBSIDIAN_VAULT_PATH/.obsidian/graph.json so Obsidian's graph view tints nodes by tag, folder, or visibility.
Obsidian stores graph settings in <vault>/.obsidian/graph.json. The colorGroups array is a list of {query, color} pairs; the first matching query wins per node. Queries use Obsidian's search syntax: tag:#foo, path:"concepts", file:foo, etc. Color is {"a": 1, "rgb": <packed-int>} where the int is (R << 16) | (G << 8) | B.
Before You Start
- Resolve config, follow the Config Resolution Protocol in
llm-wiki/SKILL.md(inline@nameoverride → walk up CWD for.env→ global config → prompt setup). This givesOBSIDIAN_VAULT_PATH. - Confirm
$OBSIDIAN_VAULT_PATH/.obsidian/exists. If it doesn't, the vault has never been opened in Obsidian, tell the user to open the vault once in Obsidian, then re-run. - Warn the user if Obsidian is likely open: Obsidian overwrites
graph.jsonon close. Tell them to close the vault first, or be ready to reload (Cmd/Ctrl+R) and not touch the graph settings until they reload.
Step 1: Pick a Mode
Infer the mode from the user's phrasing. If ambiguous, default to by-tag.
| User intent | Mode |
|---|---|
| "color by tag", "color my graph", "make it colorful" (default) | by-tag |
| "color by folder", "color by category", "color by directory" | by-category |
| "highlight visibility", "show internal/pii in graph", "visibility colors" | by-visibility |
User provides explicit mapping (tag:#foo = red, or JSON blob) | custom |
| "combine tag and visibility" / "both" | combined (visibility first, then tag) |
Step 2: Build the colorGroups Array
Palette (10 distinct, colorblind-friendly colors)
Use in order. If more groups than colors, cycle and add a lightness shift by dividing brightness ~20% via a second pass, or just cap at 10 and tell the user the remaining tags share the "other" color.
