Can the background color of a group be set separately?

0 votes
asked Jan 29, 2015 in Wanted features by anonymous
skinparam backgroundColor can set the background color for the image as a whole *and* for the boxes created by the "group" command. However, "transparent" works only for the image, and if you use transparent for the image, boxes are always #ffffff. There doesn't seem to be a separate color setting for the backgrounds of groups. The other thing I thought of was to specify a color first, then use another skinparam to select "transparent", but that just reverts to boxes being white.

I may be missing something obvious.

2 Answers

0 votes
answered Feb 3, 2015 by plantuml (294,960 points)
Thanks for the report.

"transparent" has been added quite lately, so there might be some issues here.

Could you post here a simple example that shows your issue ? This would help to understand fully.

Thanks again,
commented Feb 3, 2015 by anonymous
It's pretty trivial, just make anything with a group, and put "skinparam backgroundColor transparent" above it.

If you use a color that isn't transparent, the group's background will be that color too. If you use transparent, it's plain white.
commented Feb 3, 2015 by plantuml (294,960 points)
You mean, like in the following example ?

@startuml
skinparam backgroundColor transparent
Bob -> Alice : hello1
group foo
Bob -> Alice : hello2
end group
@enduml
commented Feb 3, 2015 by anonymous
That at least looks similar to the ones I was using, yeah. The group ended up white, and I couldn't find a parameter that affected group background colors. (I'd be fine with non-transparent colors, but some way to pick the color would be very useful.)
commented Feb 3, 2015 by plantuml (294,960 points)
You can also have:

@startuml
skinparam backgroundColor transparent
Bob -> Alice : hello1
group #00FF00 foo
Bob -> Alice : hello2
end group
@enduml

There are no parameter for the group background, even if you can have:
@startuml
skinparam backgroundColor transparent
skinparam sequenceGroupBackgroundColor red
skinparam backgroundColor transparent
Bob -> Alice : hello1
group foo
Bob -> Alice : hello2
end group
@enduml

But that's not what you are trying do to.
commented Sep 8, 2015 by anonymous
Is this also supported for ref?

Sample like this:

@startuml
skinparam sequenceGroupBorderThickness 1
skinparam noteBorderThickness 3
skinparam sequenceGroupBorderColor blue
skinparam sequenceGroupBackgroundColor red

alt
Bob -> Alice : hello
note left: foo
end group

ref over Alice
 boo
end ref
@enduml
commented Sep 9, 2015 by plantuml (294,960 points)
Yes, you can have:


@startuml
skinparam sequenceReferenceBorderThickness 1
skinparam noteBorderThickness 3
skinparam sequenceReferenceBorderColor blue
skinparam sequenceReferenceBackgroundColor red

alt
Bob -> Alice : hello
note left: foo
end group

ref over Alice
 boo
end ref
@enduml

http://www.plantuml.com/plantuml/png/XOz13i8m30JlVeK_m05nwm6LyWF41z9a0rNTk3W9xwTLEI0XmMtbdLsjgSt5MQcJK1w7D3jp4sSyAfB71H6sYaujmAxtmOy9EVF-0qvQllp3_xApYXhtKl6JTNwycTOKDjuGY9mKwhJdtP5FCdXmmtU8AArJM11Bmr6La0AluPd845cVi2r0tB_jvKxj8fR_Nm00
commented Sep 14, 2015 by anonymous
Thanks for quick response!
Did not find the exact skin params before.
0 votes
answered Dec 14, 2020 by paul

You can also set colors of one specific group

@startuml
Bob -> Alice : hello1
group #transparent foo
Bob -> Alice : hello2
end group
@enduml

commented Feb 16, 2021 by Alex

With group #transparent foo which skin param did you set? Because I want to use the groups etc without hiding the  box colors.

...