PlantUML diagrams
Overview
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:
-
The PlantUML website shows how to specify and adapt elements of diagrams in more detail.
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.
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.
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.
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.
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 |