user1605665
user1605665

Reputation: 4151

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

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

Upvotes: 12

Views: 18056

Answers (1)

Voicu
Voicu

Reputation: 17850

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

Upvotes: 40

Related Questions