PlantUML diagrams

Overview

PlantUML Diagrams
Figure 1. PlantUML Diagrams

The next pages show examples of diagrams with their available elements, to verify the styling. Two pointers for more information on the syntax and the meaning of diagrams:

Colour conventions

We include a PlantUML configuration file when generating diagram images. This configuration file uses color variables across UML elements, divided in types of diagram elements.

Colour conventions for types of diagram elements
Figure 2. Colour conventions for types of diagram elements

The boxes above are coloured using stereotypes. It is also possible to use variables for individual elements. However, this does not include foreground and border colours.

Example: the primary node uses a stereotype, the others plain colours
skinparam participant<<node_1>> {
  $node_1_style(1)
}
participant "Primary node" <<node 1>>

participant "Secondary node" $node_2_main_color
participant "Logic element" $logic_main_color
participant "Grouping element" $group_main_color
participant "Divider element" $divider_main_color
participant "Note" $note_main_color

The admonition colors are also included, to make it easy to use them in diagrams as well.

Using admonition colors for elements
Figure 3. Using admonition colors for elements
Source for the example above
hide footbox

participant tip <<(T,$tip_color)>>
note over tip $tip_color: Tip

participant note <<(N,$note_color)>>
/ note over note $note_color: Note

participant warning <<(W,$warning_color)>>
/ note over warning $warning_color: Warning

participant caution <<(C,$caution_color)>>
/ note over caution $caution_color: Caution

participant important <<(I,$important_color)>>
/ note over important $important_color: Important

Add the PlantUML configuration

The Kroki server that generates PlantUML diagrams has an option to include the PlantUML configuration file.

In Antora playbook, add a reference to the PlantUML configuration
asciidoc:
  extensions:
  - asciidoctor-kroki
  attributes:
    ... (1)
    kroki-server-url: http://localhost:18181
    kroki-plantuml-include: plantuml-styling.cfg (2)
1 Other configuration options
2 Location of the PlantUML styling
Twitter LinkedIn Github Gitlab Meetup RSS Miro Trello Zotero Hypothesis