注释中文本块的 plantuml 背景颜色

Kir*_*han 6 plantuml

我正在尝试为 Plantuml 序列图“注释”中的特定多行文本块设置背景颜色。

例如,在下面的 Plantuml 序列图片段中,如何为<code>注释的一部分应用特定的背景颜色?

participant Alice
note left of Alice
    This text with default color.
    <code>
    println("Hello Alice")
    println("Welcome to Wonderland!")
    </code>
end note
Run Code Online (Sandbox Code Playgroud)

到目前为止,我只能找到<back:color>,但它似乎不适用于多行文本。

alb*_*ert 0

我认为您的问题的解决方案可能是皮肤参数:

@startuml
skinparam NoteBackgroundColor red
participant Alice
note left of Alice
    This text with default color.
    <code>
    println("Hello Alice")
    println("Welcome to Wonderland!")
    </code>
end note
@enduml
Run Code Online (Sandbox Code Playgroud)

请参阅完整列表,例如java -Djava.awt.headless=true -jar plantuml.jar -language有关皮肤参数的可用文档。

注意:OP 只想让该code部分采用另一种颜色,而此解决方案为整个部分提供了note背景颜色。