README file from
GithubGraph Source Color
An Obsidian plugin that dynamically colors graph nodes based on their linked "source" notes.
Features
- Source Detection — Automatically identifies source notes within configured folders. Each folder becomes a color group.
- Link Propagation — Recursively traces outgoing and incoming links to associate notes with their relevant sources. Linked notes inherit source colors through BFS propagation.
- Multi-Color Nodes — Notes linked to multiple sources display split-color nodes:
- 2 sources → left/right split
- 3+ sources → pie-chart split
- Read-Only — Does not modify Obsidian's native
graph.jsonconfiguration. - Folder Tree Selector — Visual folder picker in settings for easy source folder configuration.
- Color Inheritance — Parent folder colors cascade to sub-folders that don't have an explicit color set.
Installation
From Obsidian Community Plugins (pending approval)
- Open Settings → Community Plugins
- Search for "Graph Source Color"
- Install and enable
Manual Installation
- Download
main.jsandmanifest.jsonfrom the latest release - Copy both files to your vault:
<vault>/.obsidian/plugins/graph-source-color/ - Restart Obsidian and enable the plugin in Settings → Community Plugins
Configuration
Open Settings → "Graph Source Color" to configure:
| Setting | Default | Description |
|---|---|---|
| Enable Multi-Color Nodes | true | Show split-color nodes for notes linked to multiple sources |
| Source Folders | — | Folders containing source notes (each folder = one color group) |
| Group Colors | auto-assigned | Color for each source folder |
Note: Source folder colors can also be set in Obsidian's native graph settings (color groups with path: queries). The plugin will read and respect those colors.
How It Works
Source Identification
Notes inside configured source folders are automatically treated as source notes. Their group is determined by the folder they belong to.
Association Logic
- Outgoing links — A source note's outgoing links associate the target note with that source
- Incoming links — A non-source note linking to a source becomes associated with that source
- Propagation — Notes already associated with sources propagate those associations through their own outgoing links (BFS)
Demo
View the interactive demo — Step-by-step animation showing how source colors propagate through links.
Commands
| Command | Description |
|---|---|
| Refresh Graph Colors | Rebuild color cache and re-render overlay |
| Debug Graph Nodes | Output node color info to developer console |
Compatibility
- Minimum Obsidian version: 0.15.0
- Desktop and mobile supported
Development
npm install
npm run dev # Watch mode
npm run build # Production build