Thursday, 14 December 2023

PlantUML: Add color to the arrow in a deployment diagram

Using #color syntax, we can add color to the line.

node1 -[#red]-> node2 : [red color line]
node1 -[#00ff00]-> node3  : [green color line]

We can apply line style and color together.

node1 -[#blue,dotted]-> node4 : [blue dotted line]

We can add line thickness too.

node1 -[#pink,dashed,thickness=8]-> node5 : [pink dashed line]

lineColor.txt

@startuml

node node1
node node2
node node3
node node4
node node5

node1 -[#red]-> node2 : [red color line]
node1 -[#00ff00]-> node3  : [green color line]
node1 -[#blue,dotted]-> node4 : [blue dotted line]
node1 -[#pink,dashed,thickness=8]-> node5 : [pink dashed line]

@enduml

Above snippet generate below diagram.



 

Previous                                                    Next                                                    Home

No comments:

Post a Comment