How to set default arrow/edge color in deployment?

0 votes
asked Mar 26, 2020 in Question / help by Bastian

Hello,

how can I set the default color for all arrows/edges in a deployment diagram? I can change the color directly for each arrow, but I cannot set it with skinparam globally.

skinparam rectangle {
BorderColor #FF0000
ArrowColor #00FF00
}

agent a
rectangle b

a -[#0000FF]-> b
b -> a

The arrow from b to a is still in default color, not in #00FF00.

Thanks for your help.

1 Answer

0 votes
answered Mar 27, 2020 by albert (3,520 points)

I think there is a misunderstanding regarding the skinparam (as far as my knowledge go). The skinparam rectangle is valid for the rectangle only but not for the connection elements. When using the following I think you get what you want to have:

@startuml
skinparam rectangle {
  BorderColor #FF0000
}
skinparam     ArrowColor #00FF00

    agent a
    rectangle b

    a -[#0000FF]-> b
    b -> a
@enduml

commented Mar 27, 2020 by Bastian
@albert

Thank you, it's working now.
commented Dec 7, 2023 by pedorcas (100 points)
issue with this is... these arrows are not regular arrows for skinparam... dunno why. so they follow the color of skinparam activityBorderColor and not skinparam activityArrowColor, which is annoying if you want to make borders invisible (e.g. white)
commented Dec 7, 2023 by albert (3,520 points)

@pedorcas what do you mean, can you give an example?

When I set instead of skinparam ArrowColor #00FF00 the skinparam activityArrowColor #00FF00 in the example I gave the line b->a is still green.

Which version of plantuml are you using? (I tested with 1.2023.13beta3 on http://www.plantuml.com/plantuml/uml).

commented Dec 7, 2023 by pedorcas (100 points)

Hi @albert,

This is specificaly when using arrows in forks in activity diagrams.

I opened an issue on the git project: https://github.com/plantuml/plantuml/issues/1622

I have made an example and tested on the: live uml server, showcases the problem, not sure what version it is of plantuml. See the arrows getting set to the same color of Borders definition.

...