Coloring single ports

0 votes
asked Jul 26, 2022 in Bug by Philipp

Coloring ports in component diagrams only works for all of them at once, not for single ports. I tried different methods, but never managed to make any work ... Is this intended?

Here some tries: 

CodeOutput
@startuml
skinparam boundary {
  BorderColor #greenyellow
  BackgroundColor #black
  BorderColor<<magenta>> #magenta
}

component comp {
  port "8000" as p80
  port "8010" as p81 <<magenta>>
  port "8020" as p82 #orange
  port "8030" as p83 #line:orange
}
@enduml

Also why are `BorderColor` and `BackgroundColor` for Ports flipped? Any input is appreciated.

Regards.

1 Answer

0 votes
answered Jul 27, 2022 by plantuml (295,760 points)
 
Best answer

Thanks for the feedback!

This is indeed a bug that we have fixed in last snapshot.

Skinparam are also working now but is deprecated so we suggest that you use style syntax:

@startuml
<style>
boundary {
  LineColor #greenyellow
  BackgroundColor #red
  .magenta {
  LineColor #magenta
  BackgroundColor #magenta
  }
}
</style>
component comp {
  port "8000" as p80
  port "8010" as p81 <<magenta>>
  port "8020" as p82 #orange
  port "8030" as p83 #green;line:blue
}
@enduml

Tell us if you find other issues!

commented Jul 27, 2022 by The-Lu (70,400 points)

Hello PlantUML team,

Why port is assimilate as boundary?

Is it possible to have:

@startuml
<style>
port {
  LineColor #greenyellow
  BackgroundColor #red
  .magenta {
  LineColor #magenta
  BackgroundColor #magenta
  }
}
</style>
component comp {
  port "8000" as p80
  port "8010" as p81 <<magenta>>
  port "8020" as p82 #orange
  port "8030" as p83 #green;line:blue
}
@enduml

Regards.

...