Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I color a single arrow in a plant UML component diagram

Tags:

plantuml

From the documentation its clear of how to color all the arrows using a skinparam and I can change the overall color of a component using colors. Its just unclear to me on how to color the arrows only.

e.g. in the below example how could I make the arrow from component1 to component3 have a different colour

Plant UML Code

@startuml
  [Component1] as 1
  [Component2] as 2
  [Component3] as 3
  1 --> 2
  1 --> 3
@enduml

Resulting Diagram

enter image description here

like image 264
user1605665 Avatar asked Jul 19 '16 07:07

user1605665


1 Answers

Add the color within brackets inside the arrow you want colored: 1 -[#blue]-> 3

You can use hex color code as well: #0000FF instead of #blue for example.

@startuml
  [Component1] as 1
  [Component2] as 2
  [Component3] as 3
  1 --> 2
  1 -[#blue]-> 3
@enduml

Result:

enter image description here

like image 151
Voicu Avatar answered Dec 31 '22 02:12

Voicu