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

Laptop with some code on screen

I want to write my first embedded program. Where do I start?

The boom in the Internet of Things (IoT) commercial devices and hobbyist platforms like the Raspberry Pi and Arduino have created a lot of options, offering inexpensive platforms with easy to use development tools for creating embedded projects. You have a lot of options to choose from. An embedded development platform is typically a microcontroller chip mounted on a circuit board designed to show off its features. There are typically two types out there: there are inexpensive versions, sometimes called

Read More »
Medical device monitoring vitals

IEC-62304 Medical Device Software – Software Life Cycle Processes Primer – Part 1

IEC-62304 Software Lifecycle requires a lot of self-reflection to scrutinize and document your development processes. There is an endless pursuit of perfection when it comes to heavily regulated industries. How can you guarantee something will have zero defects? That’s a pretty hefty task. The regulatory approach for the medical device industry is process control. The concept essentially states that if you document how every step must be completed, and provide checks to show every step has been completed properly, you

Read More »
Operating room filled with medical devices

IEC-62304 Medical Device Software – Software Life Cycle Processes Primer – Part II

Part I provides some background to IEC-62304. Part II provides a slightly more in-depth look at some of the specifics. The IEC 62304 Medical Device Software – Software Lifecycle Processes looks into your development processes for creating and maintaining your software. The standard is available for purchase here. So what activities does the standard look at? Here are some of the major topics. For any given topic, there will be a lot more specifics. This will look at a few

Read More »