<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5" -->

---
title: Changing Colors and Line Styles in netlab Graphs «...
description: netlab release 25.09 adds support for customizing network topology graph visuals. Using the graph.fill attribute, node background colors can be set per node or...
canonical: https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Changing Colors and Line Styles in netlab Graphs « ipSpace.net blog | daily.dev
og:description: netlab release 25.09 adds support for customizing network topology graph visuals. Using the graph.fill attribute, node background colors can be set per node or...
og:url: https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5
og:image: https://api.daily.dev/og/posts/l00OUPlg5.png
og:image:alt: Changing Colors and Line Styles in netlab Graphs « ipSpace.net blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Changing Colors and Line Styles in netlab Graphs « ipSpace.net blog

**[ipSpace.net Blog](https://daily.dev/sources/ipspace)** · 5 min read · 0 upvotes · 0 comments

## Summary

netlab release 25.09 adds support for customizing network topology graph visuals. Using the graph.fill attribute, node background colors can be set per node or group. The graph.width attribute controls link thickness to distinguish primary vs. backup links. For attributes not natively supported (like text color), custom graph attributes can be defined and mapped to GraphViz/D2 style properties via system defaults. Both GraphViz and D2 engines honor these attributes consistently. A step-by-step guide for trying this in GitHub Codespaces is included.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2025/09/netlab-graphs-colors-lines>

## Questions this post answers

### How do I change the background color of nodes in a netlab topology graph?

Set the graph.fill attribute on a node or group in the netlab topology YAML. The value must be a color recognized by GraphViz and D2 — either a color name like 'red' or an RGB hex triplet prefixed with '#' and quoted (e.g., '#d26400'), since YAML treats unquoted '#' as a comment. This works consistently across both GraphViz and D2 output modules.

_Network engineers building visual lab topologies track netlab attribute changes like these on daily.dev._

### How do I add a custom graph attribute to netlab that maps to a GraphViz style property like fontcolor?

Define the new attribute under defaults.outputs.graph.attributes.node (e.g., textcolor: str), then map it to the GraphViz attribute via defaults.outputs.graph.style_map (e.g., textcolor: fontcolor). These defaults can be placed in user defaults files so they apply across all lab topologies. The same approach works for D2 graphs.

_Developers extending netlab for custom graph styling find relevant examples and release notes on daily.dev._

## Similar posts on daily.dev

- [Compress netlab Lab Topologies with Dot Notation « ipSpace.net blog](https://daily.dev/posts/compress-netlab-lab-topologies-with-dot-notation-ipspace-net-blog-johomwxka) · ipSpace.net Blog · 0 upvotes · 0 comments
- [How to visualize workflows and business processes in Grafana: Introducing the Graphviz panel](https://daily.dev/posts/how-to-visualize-workflows-and-business-processes-in-grafana-introducing-the-graphviz-panel-h70qrfs37) · Grafana Labs · 2 upvotes · 0 comments
- [Graph Coloring You Can See](https://daily.dev/posts/graph-coloring-you-can-see-iuk0aslhm) · Towards Data Science · 0 upvotes · 0 comments
- [JSON Canvas Spec](https://daily.dev/posts/json-canvas-spec-q4wfps1p2) · Hacker News · 1 upvotes · 0 comments
- [Dynamic Node Connection \(CSS-only Diagram\)](https://daily.dev/posts/dynamic-node-connection-css-only-diagram--fe4f6bmm4) · CSS Tip · 21 upvotes · 1 comments

---

Tags: [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Changing Colors and Line Styles in netlab Graphs « ipSpace.net blog","url":"https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5"},"datePublished":"2026-08-11T08:52:56.135Z","dateModified":"2026-08-11T09:13:34.096Z","description":"netlab release 25.09 adds support for customizing network topology graph visuals. Using the graph.fill attribute, node background colors can be set per node or...","image":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","thumbnailUrl":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","isAccessibleForFree":true,"articleSection":"ipSpace.net Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ipSpace.net Blog","logo":"https://media.daily.dev/image/upload/s--xS7E82MT--/f_auto,q_auto/v1786438303/logos/ipspace?_a=BAMAMicg0","url":"https://daily.dev/sources/ipspace"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"networking","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ipSpace.net Blog","item":"https://daily.dev/sources/ipspace"},{"@type":"ListItem","position":3,"name":"Changing Colors and Line Styles in netlab Graphs « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/changing-colors-and-line-styles-in-netlab-graphs-ipspace-net-blog-l00ouplg5#faq","mainEntity":[{"@type":"Question","name":"How do I change the background color of nodes in a netlab topology graph?","acceptedAnswer":{"@type":"Answer","text":"Set the graph.fill attribute on a node or group in the netlab topology YAML. The value must be a color recognized by GraphViz and D2 — either a color name like 'red' or an RGB hex triplet prefixed with '#' and quoted (e.g., '#d26400'), since YAML treats unquoted '#' as a comment. This works consistently across both GraphViz and D2 output modules. Network engineers building visual lab topologies track netlab attribute changes like these on daily.dev."}},{"@type":"Question","name":"How do I add a custom graph attribute to netlab that maps to a GraphViz style property like fontcolor?","acceptedAnswer":{"@type":"Answer","text":"Define the new attribute under defaults.outputs.graph.attributes.node (e.g., textcolor: str), then map it to the GraphViz attribute via defaults.outputs.graph.style_map (e.g., textcolor: fontcolor). These defaults can be placed in user defaults files so they apply across all lab topologies. The same approach works for D2 graphs. Developers extending netlab for custom graph styling find relevant examples and release notes on daily.dev."}}]}
```

