# Changing Colors and Line Styles in netlab Graphs

DevFeed: [Changing Colors and Line Styles in netlab Graphs](<https://devfeed.tech/articles/changing-colors-and-line-styles-in-netlab-graphs-11246.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2025/09/netlab-graphs-colors-lines/>)

Published: 2025-09-22T05:38:00Z

Content type: tutorial

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [Graphs](<https://devfeed.tech/topics/graphs.md>), [Network design](<https://devfeed.tech/topics/network-design.md>), [SVG](<https://devfeed.tech/topics/svg.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [github](<https://devfeed.tech/tags/github.md>), [graph](<https://devfeed.tech/tags/graph.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [netlab](<https://devfeed.tech/tags/netlab.md>), [network](<https://devfeed.tech/tags/network.md>), [svg](<https://devfeed.tech/tags/svg.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

A tutorial on styling network topology graphs generated from netlab lab topologies. It shows how to use graph attributes and groups to change node colors and link widths across GraphViz and D2 outputs, and how to map a custom text-color attribute to GraphViz.

## Source excerpt

Last week, I explained how to generate network topology graphs (using GraphViz or D2 graphing engines) from a netlab lab topology. Let's see how we can make them look nicer (or at least more informative). We'll work with a simple leaf-and-spine topology with four nodes1: Baseline leaf-and-spine topology defaults.device: frr provider: clab nodes: [ s1, s2, l1, l2 ] links: [ s1-l1, s1-l2, s2-l1, s2-l2 ] This is the graph generated by netlab create followed by dot graph.dot -T png -o graph.png: Read more ...