Coloring of Different Components without << >> tag ?

0 votes
asked Sep 30, 2014 in Bug by MJ (180 points)

Hi Guys,

I was looking at making different components different colours, but I noticed that to do this you need to include <<example>> which will show on the diagram. 

http://plantuml.sourceforge.net/imgp/component_011.png

Sample Code:

skinparam component {
    backgroundColor<<1>> Pink
    backgroundColor<<2>> Green
}
 
package "SYSTEM1" {
 
[ComponentBox] <<1>>
[AnotherCompBox] <<2>>
 
}

This will display:

<<1>>
ComponentBox


<<2>>
AnotherCompBox


I want it to display only:

ComponentBox

AnotherCompBox

 

-----------

Is there anyway to hide this or tips in having multiple colours for my components another way?

Many thanks in advance!

1 Answer

+2 votes
answered Sep 30, 2014 by plantuml (276,340 points)

You can use the hide command:

(see http://www.plantuml.com/classes.html#Hide )

hide stereotype
skinparam component {
    backgroundColor<<1>> Pink
    backgroundColor<<2>> Green
}
 
package "SYSTEM1" {
 
[ComponentBox] <<1>>
[AnotherCompBox] <<2>>
 

Regards,

commented Oct 8, 2014 by MJ (180 points)
Legend! Thank you so much for this!!
...