# Graph Colorize

Configure Obsidian graph colors by tag, folder, category, or visibility by updating...

- Repository: https://github.com/Ar9av/obsidian-wiki (3650 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Ar9av/obsidian-wiki --skill graph-colorize -g -a claude-code -y`
Codex: `npx skills add Ar9av/obsidian-wiki --skill graph-colorize -g -a codex -y`
Cursor: `npx skills add Ar9av/obsidian-wiki --skill graph-colorize -g -a cursor -y`
Gemini CLI: `npx skills add Ar9av/obsidian-wiki --skill graph-colorize -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Ar9av/obsidian-wiki`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

1. **Resolve config**, follow the Config Resolution Protocol in `llm-wiki/SKILL.md` (inline `@name` override → walk up CWD for `.env` → global config → prompt setup). This gives `OBSIDIAN_VAULT_PATH`.
2. 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.
3. **Warn the user if Obsidian is likely open**: Obsidian overwrites `graph.json` on 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.

The rest: https://github.com/Ar9av/obsidian-wiki/blob/HEAD/.skills/graph-colorize/SKILL.md
