gvcolor

graphviz filter that colors nodes in a ranked directed graph

TLDR

Color a graph by rank
$ dot -Tcanon [graph.gv] | gvcolor | dot -Tpng -o [output.png]
Color and output to file
$ dot -Tcanon [graph.gv] | gvcolor > [colored.gv]

SYNOPSIS

gvcolor [files]

DESCRIPTION

gvcolor (formerly colorize) is a Graphviz filter that sets node colors from initial seed values on a ranked digraph. Colors flow along edges from tail to head and are averaged, as HSB vectors, at each node, producing a visual gradient across the graph.The graph must already be laid out by dot (so nodes carry position/rank information), and initial colors are set via the color attribute on seed nodes. The graph attribute flow=back reverses the direction colors propagate, saturation=min,max adjusts saturation linearly across ranks, and Defcolor sets a fallback color for uncolored nodes.

PARAMETERS

FILES

Input graph files already laid out by dot. Reads stdin if none given.

INSTALL

sudo apt install graphviz
sudo dnf install graphviz
sudo pacman -S graphviz
sudo apk add graphviz
sudo zypper install graphviz
brew install graphviz
nix profile install nixpkgs#graphviz

CAVEATS

Requires a graph already processed by dot; exits with status 1 if nodes lack position information. Related but distinguishable seed colors (e.g., blue-green, green, light yellow) work best.

SEE ALSO

dot(1), gc(1), gvpr(1), ccomps(1), sccmap(1), tred(1)

RESOURCES

Homepage · Source code · Documentation