How to use textcolor for rectangle?

0 votes
asked Aug 12 in Bug by NSchwirz (120 points)

Thanks for developing PlantUML.

Maybe I found a bug in PlantUML handling of textclor for rectangles and similar container objects. I tried it with several versions of PlantUML on linux and the online editor. Before I wrote this I took a furtther look to the docu and found examples that behave other than they should.

## In short ##

coloring of text in some objects (e.g. rectangles) seems to be ignored while other styling (e.g. coloring of lines) work as it schould.

## Long version ##

@startuml
version
@enduml


@startuml
rectangle "My first Box" as box1 #text:red;line:red {
Bob -> Alice
}
@enduml

@startuml
skinparam rectangleTextColor red
skinparam rectangleBorderColor red

rectangle "My second Box" as box1 {
Bob -> Alice
}
@enduml

@startuml
<style>
rectangle {
LineColor red
TextColor red
}
</style>

rectangle "My first Box" as box1 {
Bob -> Alice
}
@enduml


@startuml
artifact artifact #aliceblue;line:blue;line.dotted;text:blue {
}
card card #aliceblue;line:blue;line.dotted;text:blue {
}
cloud cloud #aliceblue;line:blue;line.dotted;text:blue {
}
component component #aliceblue;line:blue;line.dotted;text:blue {
}
database database #aliceblue;line:blue;line.dotted;text:blue {
}
file file #aliceblue;line:blue;line.dotted;text:blue {
}
folder folder #aliceblue;line:blue;line.dotted;text:blue {
}
frame frame #aliceblue;line:blue;line.dotted;text:blue {
}
hexagon hexagon #aliceblue;line:blue;line.dotted;text:blue {
}
node node #aliceblue;line:blue;line.dotted;text:blue {
}
package package #aliceblue;line:blue;line.dotted;text:blue {
}
queue queue #aliceblue;line:blue;line.dotted;text:blue {
}
rectangle rectangle #aliceblue;line:blue;line.dotted;text:blue {
}
stack stack #aliceblue;line:blue;line.dotted;text:blue {
}
storage storage #aliceblue;line:blue;line.dotted;text:blue {
}
@enduml


@startuml
artifact artifactVeryLOOOOOOOOOOOOOOOOOOOg as "artifact" #aliceblue;line:blue;line.dotted;text:blue {
file f1
}
card cardVeryLOOOOOOOOOOOOOOOOOOOg as "card" #aliceblue;line:blue;line.dotted;text:blue {
file f2
}
cloud cloudVeryLOOOOOOOOOOOOOOOOOOOg as "cloud" #aliceblue;line:blue;line.dotted;text:blue {
file f3
}
component componentVeryLOOOOOOOOOOOOOOOOOOOg as "component" #aliceblue;line:blue;line.dotted;text:blue {
file f4
}
database databaseVeryLOOOOOOOOOOOOOOOOOOOg as "database" #aliceblue;line:blue;line.dotted;text:blue {
file f5
}
file fileVeryLOOOOOOOOOOOOOOOOOOOg as "file" #aliceblue;line:blue;line.dotted;text:blue {
file f6
}
folder folderVeryLOOOOOOOOOOOOOOOOOOOg as "folder" #aliceblue;line:blue;line.dotted;text:blue {
file f7
}
frame frameVeryLOOOOOOOOOOOOOOOOOOOg as "frame" #aliceblue;line:blue;line.dotted;text:blue {
file f8
}
hexagon hexagonVeryLOOOOOOOOOOOOOOOOOOOg as "hexagon" #aliceblue;line:blue;line.dotted;text:blue {
file f9
}
node nodeVeryLOOOOOOOOOOOOOOOOOOOg as "node" #aliceblue;line:blue;line.dotted;text:blue {
file f10
}
package packageVeryLOOOOOOOOOOOOOOOOOOOg as "package" #aliceblue;line:blue;line.dotted;text:blue {
file f11
}
queue queueVeryLOOOOOOOOOOOOOOOOOOOg as "queue" #aliceblue;line:blue;line.dotted;text:blue {
file f12
}
rectangle rectangleVeryLOOOOOOOOOOOOOOOOOOOg as "rectangle" #aliceblue;line:blue;line.dotted;text:blue {
file f13
}
stack stackVeryLOOOOOOOOOOOOOOOOOOOg as "stack" #aliceblue;line:blue;line.dotted;text:blue {
file f14
}
storage storageVeryLOOOOOOOOOOOOOOOOOOOg as "storage" #aliceblue;line:blue;line.dotted;text:blue {
file f15
}
@enduml
commented Aug 14 by The-Lu (49,840 points)

Hello N, and all,

Perhaps it is due to, on style, textcolor must be replace by fontcolor, as:

@startuml
<style>
rectangle {
  LineColor red
  FontColor red
}
</style>

rectangle "My first Box" as box1 {
Bob -> Alice
}
@enduml

Regards.

commented Sep 15 by NSchwirz (120 points)
Thanks for the advice. Now it works in the updated Online server.

1 Answer

0 votes
answered Aug 26 by plantuml (279,680 points)

Thanks for the report.

This has been fixed in last snapshot  and on the online server.

Tell us if you find other issues!

commented Sep 15 by NSchwirz (120 points)
Thanks. I tried it in the online server and it works now.
...