Please provide a skinparam to set the background color of the activity beta diamond node

0 votes
asked Apr 12, 2017 in Closed feature request by ddecock (140 points)

I'd like a skinparam to set the background color of the activity beta diamond node.

It currently is the same as the skinparam activityBackgroundColor, but we normally use Yellow for the conditions, and another color for the actions.

related to an answer for: skinparam for condition boxes?

1 Answer

0 votes
answered Apr 13, 2017 by plantuml (295,800 points)
selected Mar 23, 2018 by Anthony-Gaudino
 
Best answer
No, there are no such setting yet.

Could you post here a simple example of what you are expecting ? It would help us to better understand your need.

Thanks!
commented Apr 13, 2017 by ddecock (140 points)
Hi,

I was thinking on creating some kind of style sheet for our activity diagrams using the new activity beta syntax.

Example:

skinparam activity {
    StartColor GreenYellow
    EndColor Red
    BackgroundColor AliceBlue
    'BorderColor SkyBlue
    BorderColor DarkGrey
    FontSize 24
    FontColor Black
}

skinparam arrow {
    Color Black
    FontSize 24
    MessageAlign center
}

skinparam note {
    BackgroundColor LightYellow
    BorderColor Black
    FontSize 18
}

skinparam activityDiamond {
    BackgroundColor LightYellow
    BorderColor Olive
    FontSize 24
}

This would make all activityDiamonds yellow with a green border, ....

At the moment, I use this code:

#LightYellow:repeat
    :**ANALYSE** customer needs;
    -> **1**;
    |Operations|
    #LightYellow:if (project requires customisation?) then (no)
.....

This has the following disadvantages:
 - I have to repeat the color every time
 - I can't change the border color
 - It's not easy to play with the color configurations...

As you might have seen in my example, I'm also looking at an alignment option for text belonging to an arrow, but I will create a different ticket for that ;)

Thanks!
commented Apr 13, 2017 by plantuml (295,800 points)
Ok, thanks for the explanation.
With last beta
https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0
You can have:
@startuml
skinparam activityDiamond {
    BackgroundColor red
    BorderColor blue
    FontSize 24
}
start
:tekst1;
if (teks2) then (yes)
 :tekst1;
else (no)
 :tekst1;
endif
:tekst1;
stop
@enduml

Tell us if you find issues!
commented Apr 13, 2017 by ddecock (140 points)
Perfect! So far, so good!

Great work, thanks!
commented Mar 25, 2019 by zooce (140 points)
Would it be possible to color individual if diamonds, rather than coloring them globally?
commented Jun 4, 2020 by potatohead

#<color>:if(...)

Ensure no space with ":" and "if"

@startuml
start
#green:if (Turn On The Game?) then (yes)
  :Having Fun;
else (no)
  #red:Not Having Fun;
  note right:sad note is sad
endif
stop
@enduml

reference code from see https://forum.plantuml.net/4710/please-provide-way-to-inline-set-the-background-color-notes?show=4710#q4710

commented Jul 1, 2021 by PeteR

@potatohead

This is not possible for diamonds which is what @zooce was asking about

...