Loading...
Loading...
Color-code the Obsidian graph view by rewriting `.obsidian/graph.json` colorGroups. Use this skill when the user says "color my graph", "color code obsidian", "colorize the graph", "color the graph by tag", "color by category", "highlight visibility in graph", "make the graph colorful", "distinguish tags in graph", or wants nodes in Obsidian's graph view tinted by tag, folder, or visibility. Generates a `colorGroups` array from the vault's actual tags/categories and merges it into the existing graph.json without clobbering other graph settings. Always backs up first.
npx skill4agent add ar9av/obsidian-wiki graph-colorize$OBSIDIAN_VAULT_PATH/.obsidian/graph.json<vault>/.obsidian/graph.jsoncolorGroups{query, color}tag:#foopath:"concepts"file:foo{"a": 1, "rgb": <packed-int>}(R << 16) | (G << 8) | B~/.obsidian-wiki/config.envOBSIDIAN_VAULT_PATH$OBSIDIAN_VAULT_PATH/.obsidian/graph.json| User intent | Mode |
|---|---|
| "color by tag", "color my graph", "make it colorful" (default) | |
| "color by folder", "color by category", "color by directory" | |
| "highlight visibility", "show internal/pii in graph", "visibility colors" | |
User provides explicit mapping ( | |
| "combine tag and visibility" / "both" | |
colorGroups| # | Hex | rgb (packed int) | Role |
|---|---|---|---|
| 0 | | | blue |
| 1 | | | orange |
| 2 | | | red |
| 3 | | | teal |
| 4 | | | green |
| 5 | | | yellow |
| 6 | | | purple |
| 7 | | | pink |
| 8 | | | brown |
| 9 | | | gray |
{"a": 1, "rgb": <int>}by-tag$VAULT_PATH/**/*.md_archives/_raw/.obsidian/node_modules/index.mdlog.md_insights.mdtagsvisibility/*by-visibilitycombinedTi{"query": "tag:#T", "color": palette[i]}{"query": "-[\"tag\":]", "color": palette[9]}by-category| Folder | Color index |
|---|---|
| 0 (blue) |
| 1 (orange) |
| 2 (red) |
| 3 (teal) |
| 4 (green) |
| 5 (yellow) |
| 6 (purple) |
.md{"query": "path:\"<folder>\"", "color": {"a": 1, "rgb": <int>}}by-visibilityvisibility/pii#E15759visibility/internal#F28E2Bvisibility/public#59A14F{"query": "tag:#visibility/pii", "color": {"a": 1, "rgb": 14767961}}visibility/combinedby-visibilityby-tagcustom#FF00FFint(hex_without_hash, 16){"a": 1, "rgb": <int>}$VAULT_PATH/.obsidian/graph.json{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": false,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 1,
"close": true
}.obsidian/graph.json.backup-<YYYYMMDD-HHMM>colorGroupsGraph colorized → .obsidian/graph.json
Mode: by-tag
Groups: 7 color assignments
Palette: blue, orange, red, teal, green, yellow, purple
Backup: .obsidian/graph.json.backup-20260424-1432
Reload Obsidian (Cmd/Ctrl+R) to see the new colors.
If Obsidian is currently open, close it first OR reload immediately — Obsidian
overwrites graph.json on close and can erase these changes.$VAULT_PATH/log.md- [TIMESTAMP] GRAPH_COLORIZE mode=<mode> groups=<N> backup=graph.json.backup-<stamp>by-tagby-categorygraph.json.backup-*log.mdcolorGroups: []GRAPH_COLORIZE mode=clear.obsidian/.obsidian/path:"my folder"tag:#visibility/internalcolorGroupscombinedwiki-exportgraph.html