6

从文档中可以清楚地看出如何使用 skinparam 为所有箭头着色,我可以使用颜色更改组件的整体颜色。我只是不清楚如何只给箭头上色。

例如,在下面的示例中,如何使从 component1 到 component3 的箭头具有不同的颜色

工厂 UML 代码

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

结果图

在此处输入图像描述

4

1 回答 1

19

在要着色的箭头内的括号内添加颜色:1 -[#blue]-> 3

您也可以使用十六进制颜色代码:例如#0000FF而不是#blue

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

结果:

在此处输入图像描述

于 2016-08-18T18:29:51.510 回答