Is it possible to change the foreground color of a Box element?

0 votes
asked 3 days ago in Question / help by gbrusella (220 points)

On this Scenario, can I change the foreground color of the "New box"?

@startuml Demo Scenario

!pragma teoz true

box "Product boundary" #PaleVioletRed
    participant P1 [
        Participant 1
        ....
        Subtitle
    ]
    participant "Participant A" as DemoA
endbox
box "New Box" #Orange
    participant "Participant B" as DemoB
endbox

P1 -> DemoA
    DemoA <-> DemoB: Do something
DemoA -> P1
@enduml

Thanks!

2 Answers

0 votes
answered 2 days ago by The-Lu (76,960 points)

Hello G.,

Currently only the background and not the foreground!

  • What is your precisely your request?

Regards,
Th.

commented 2 days ago by gbrusella (220 points)

In the ideal universe, I can also control the foreground color of individual boxes. The color today is auto-selected, An example could be:

@startuml Demo Scenario

!pragma teoz true

box "Product boundary" #PaleVioletRed
    participant P1 [
        Participant 1
        ....
        Subtitle
    ]
    participant "Participant A" as DemoA
endbox
box "New Box" #Red/Orange #White
    participant "Participant B" as DemoB
endbox

P1 -> DemoA
    DemoA <-> DemoB: Do something
DemoA -> P1
@enduml

commented 2 days ago by The-Lu (76,960 points)

Hello G.,

I still have a little trouble understanding.

  • What do you want that will be white?

Regards,
Th.

commented 1 day ago by anonymous
Is this what you are looking for?

@startuml
<style>
  participant {
    BackGroundColor white
    FontColor blue
    FontSize:: var(--default-FontSize);
    FontStyle bold
    LineColor black
  }   

</style>
!pragma teoz true
title Demo Scenario

box "Product boundary" #PaleVioletRed
    participant P1 [
        Participant 1
        ....
        Subtitle
    ]
    participant "Participant A" as DemoA
endbox
box "New Box" #Red/Orange
    participant "Participant B" as DemoB
endbox

P1 -> DemoA
    DemoA <-> DemoB: Do something
DemoA -> P1
@enduml
commented 1 day ago by gbrusella (220 points)

I finally found the way:

Look:

 

www.plantuml.com/plantuml/png/VP11IyD048Nl-ol6zApIQocbZSMZ1WjUnCCq6UBItPqwcSMg-D-T9YKj2BvBoFlWsySiEqNH78FhTZxjKJ32XjupfPfAFipd3_HXtyK2lXsKMEzQuPoQEmuiC7aKJ2tTFb5ZaAKX6S0napNAhYVtdFJS6ob39lVZtDLUi8q8Ilm5AbPk-G159TpaMc5xV0dbiu19XO6UFGVItcYngUfhlyUaK4tXnS4frGMOZksDPVpPvArw3TGNhtzqnQLYLG1siAR8AqUfiO5kM6c70RjC0USR_MygHrCvccpvzMAmps2L06lrd8wUeOJv2PSpM3Dq74dVV6hTG0rMKxSqMuxX5m00

0 votes
answered 1 day ago by anonymous
@startuml
<style>
  participant {
    BackGroundColor white
    FontColor blue
    FontSize:: var(--default-FontSize);
    FontStyle bold
    LineColor black
  }   

</style>
!pragma teoz true
title Demo Scenario

box "Product boundary" #PaleVioletRed
    participant P1 [
        Participant 1
        ....
        Subtitle
    ]
    participant "Participant A" as DemoA
endbox
box "New Box" #Red/Orange
    participant "Participant B" as DemoB
endbox

P1 -> DemoA
    DemoA <-> DemoB: Do something
DemoA -> P1
@enduml
...