DITAA Color Codes For Diagrams: Using Color To Help Separate Items In DITAA Diagrams

Use Color To Help Separate Items In DITAA Diagrams

IoT (Internet of Things) system architecture system architecture drawing

This is an example context diagram of a typical IoT (Internet of Things) system architecture, created with DITAA (DIagrams Through Ascii Art), one of the types of diagrams supported by AsciiDoctor and the VS Code AsciiDoc extension.

Creating diagrams like this follows D5’s Modern Embedded tenet of Emergent, Intentional Architecture:

Architecture matching the inherent problem to be solved, evolved and documented as the project evolves.

Color and gray-scale help separate and organize visual elements. This diagram is deliberately overly colorful to demonstrate the range of choices that DITAA offers.

For more on AsciiDoctor, see Documenting System Architecture With AsciiDoctor.

Book a Call with Dojo Five Embedded Experts

DITAA Color Codes

DITAA is a simple text format that allows the creation of free-form custom diagrams. The context diagram was generated from the following text using the AsciiDoc extension (note that the syntax for diagram inclusion is extension-dependent; other extensions may use “@startditaa” and “@endditaa” instead of “[ditaa]” and “….”):

Screenshot 2023-06-15 at 1.06.06 PM

The colors are specified by their RGB (Red, Green, Blue) component value in the “cRGB” terms in the text, with each color component ranging from 0 to F (hexadecimal 15).

Any closed figure in the diagram can have a color code. The requirement to close the figures means lines and arrows in the diagram can’t cross the figure edges, which is why they are broken into multiple segments here.

DITAA supports a small set of named colors directly, but that’s very limited. Using RGB codes allows the full range of tones and shades. There are 4096 in all.

DITAA Color Code Chart

Identifying the desired color to use in a diagram can be difficult, turning into a trial-and-error hunt for a code that looks good.

Below is a downloadable DITAA color code chart you can use as a reference resource for color selection. It was generated using DITAA. The DITAA text isn’t included here, because it’s very long (it contains a total of 4096 graphic elements!), but it’s similar to the DITAA text above. Tip: Download this chart and once you find a color you like, zoom in to see the color code.

VIRIDIS Color Palette

Alternatively, when choosing colors, it may be important to consider not just what looks nice, but also what is most accessible to a larger audience of people. A common palette that is chosen is the VIRIDIS palette which is based off of a mathematical formula designed to help guarantee the colors look distinct for people with color blindness, or even when converted to black and white. If you want to skip the math behind generating your own viridis palette, there are several generators that can be found online like this one which let you get a list of colors and their hex codes.

Conclusion

Use color to help separate items in DITAA diagrams. Use these and other diagrams to document your system architecture.

Next Steps

Dojo Five can help you with architecture documentation. We bring modern tools, techniques, and best practices from web and mobile development environments, and pair them with leading-edge innovations in firmware. We help our customers build successful products and successful clients. Bring your interesting problems that need solving-we are always happy to help out. Book a Call with Dojo Five.

Discover why Dojo Five EmbedOps is the embedded enterprise choice for build tool and test management.

Sign up to receive a free account to the EmbedOps platform and start building with confidence..

  • Connect a repo
  • Use Dev Containers with your Continuous Integration (CI) provider
  • Analyze memory usage
  • Integrate and visualize static analysis results
  • Perform Hardware-in-the-Loop (HIL) tests
  • Install the Command Line Interface for a developer-friendly experience

Subscribe to our Monthly Newsletter

Subscribe to our monthly newsletter for development insights delivered straight to your inbox.

Interested in learning more?

Best-in-class embedded firmware content, resources and best practices

HIL Raspberry Pi

Hardware-in-the-loop is hard! Sometimes.

By: Ander Galisteo, Ph.D.
The concept of hardware-in-the-loop (HIL) is not new in the embedded space. The basic idea is to automate the functional tests of your device under development to verify if your implementation does what it’s supposed to do.

Read More »
Automating Reliability Engineering with CVE Scanning & EmbedOps (Part 3)

Automating Reliability Engineering with CVE Scanning & EmbedOps, Part 3

Parts 1 and 2 of this series showed just how easy it is to automate unit testing and hardware-in-the-loop (HIL) testing with Dojo Five EmbedOps, a build integration and automation platform for commercial embedded and IoT device development teams. Both articles provided practical guides for using EmbedOps to quickly build the typical tests that a developer might conduct for a Bluetooth Low Energy (BLE)-enabled sensor, such as finding overflow bugs or verifying over-the-air (OTA) device firmware updates (DFUs). The aim

Read More »

How to Prevent Your Python Script From Getting Culture Shock in Different OS’s

After hours of focusing, you finally finish writing a Python script for your project. It works perfectly on your computer and you pushed the changes to your favorite source control provider. The next thing you know, your teammate’s complaining that the script does not work on their computer because they are running on a different operating system. Does this ring a bell? Here are a few tips for writing cross-platform python code so you never frustrate your teammate again! Use

Read More »