graph-colorize

Rewrites Obsidian graph.json colorGroups to tint graph nodes by tag, folder, or visibility.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill graph-colorize-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graph-colorize
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/graph-colorize
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill graph-colorize-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Obsidian's graph view shows all notes in one default color, making it hard to visually distinguish topics, categories, or sensitivity levels. Manually writing colorGroups queries and packed RGB integers in graph.json is tedious and error-prone. ## Core Features & Use Cases - Multiple coloring modes: Color nodes by tag frequency, top-level folder, visibility tags (pii/internal/public), a combined mode, or fully custom mappings. - Safe config merging: Backs up graph.json with a timestamped copy and replaces only the colorGroups field, preserving zoom, physics, and filter settings. - Colorblind-friendly palette: Uses a fixed 10-color palette with precomputed packed RGB integers matching Obsidian's expected format. - Use Case: After tagging your vault notes, ask to color the graph by tag so the ten most-used tags each get a distinct color in the graph view. ## Quick Start Ask the assistant to color your Obsidian graph by tag so nodes are tinted according to each note's most common tags.

Frequently Asked Questions about graph-colorize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I color code the Obsidian graph view by tag?

Color coding the Obsidian graph by tag works by writing colorGroups entries with tag:#name queries into .obsidian/graph.json. This skill scans your vault's frontmatter tags, picks the top ten by usage, and assigns each a distinct color automatically.

How do I change node colors in Obsidian graph view?

Node colors in Obsidian's graph view are controlled by the colorGroups array in .obsidian/graph.json, where each entry pairs a search query with a color. Colors use a packed integer format computed as (R << 16) | (G << 8) | B wrapped in {"a": 1, "rgb": int}.

Will editing graph.json overwrite my other Obsidian graph settings?

No, if only the colorGroups field is replaced. This skill backs up the original file with a timestamp and merges the new array while leaving zoom, physics, filters, and display preferences untouched.

Why did my Obsidian graph colors disappear after editing graph.json?

Obsidian rewrites graph.json when it closes, so edits made while the app is open get overwritten. Close Obsidian before editing, or reload immediately with Cmd/Ctrl+R and avoid opening graph settings until you do.

What happens if my Obsidian vault has no tags to color by?

If no tags are found in by-tag mode, the skill falls back to by-category mode, coloring nodes by top-level vault folders like concepts, entities, and projects. It notifies you when this fallback occurs.