GVCOLOR(1)

πŸ’– GVCOLOR β€” the flow-colors-through-a-ranked-digraph girlie πŸ’–

okay bestie, so this is gvcolor from the General Commands Manual section (that's section 1, the "run me in your shell" section, iykyk). She's a filter, she's iconic, she's been around since 2001 and she still ate. let's get into it πŸ’…


✨ NAME ✨

gvcolor β€” flow colors through a ranked digraph 🌈


🌸 SYNOPSIS 🌸

gvcolor [ files ]

πŸŽ€ USAGE πŸŽ€

dot file.gv | gvcolor | dot -T<format>

that's the whole vibe. pipe in, pipe out, no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

So gvcolor (she used to go by colorize back in the day, glow-up era) is a filter that sets node colors from initial seed values. Colors flow along edges from tail to head, and at each node they get averaged β€” as HSB vectors, because she's precise like that.

⚠️ the graph must have already been processed by dot first. she's not doing that part for you, babe.

The way it works: pick your initial colors right and you get drawings where node colors help emphasize logical relationships between nodes β€” even when those nodes are spread far apart in the layout. like, they're still matching, they still found each other, main character energy fr fr 🫢

Initial colors must be set externally, using the color attribute of a node. The classic move is to assign colors to a few key source or sink nodes, manually setting their colors by editing the graph file. Color names are as in dot(1): symbolic names or RGB triples. πŸ’–

It is best to choose some easily‐distinguished but related colors β€” not necessarily spaced evenly around the color wheel. For example, blue_green, green, and light_yellow looks better than red, green, blue. (yes, that's the actual tea from the manual, and she's right, the related palette ate πŸ’€)

Certain graph attributes control the gvcolor algorithm:

  • flow=back β€” reverses the flow of colors from heads to tails πŸ”„
  • saturation=.1,.9 (or any two numbers between 0 and 1) β€” adjusts the color saturation linearly from least to greatest rank 🎨
  • Defcolor β€” if this is set, this color value is applied to any node not otherwise colored πŸ‘‘

πŸ’€ EXIT STATUS πŸ’€

The following exit values are returned:

  1. 0 β€” Successful completion. slay ✨
  2. 1 β€” If nodes of the graph do not possess a ``pos'' attribute. πŸ’”

πŸ™ˆ BUGS πŸ™ˆ

It would be nice to make the program work without relying on an initial pass through dot. (she said what she said, bestie, that's the note 😭)


πŸ‘‘ AUTHORS πŸ‘‘

  • Stephen C. North <north@research.att.com>
  • Emden R. Gansner <erg@research.att.com>

⭐ SEE ALSO ⭐

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


and that's the whole page bestie β€” brought to you by the 21 March 2001 edition of the GVCOLOR(1) manual page, version one, still serving looks πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from