Thursday, 14 September 2023

How to Customize Class Color and Style in PlantUML Using Inline Style

Using below style, we can customize the class color and style.

 

#[color|back:color];header:color;line:color;line.[bold|dashed|dotted];text:color

 

classColorAndStyle.txt

@startuml

abstract AbstactList
annotation Documented #pink;line:red;line.bold;text:red
class ArrayList #aliceblue;line:green;line.dashed;text:green
interface List #gold;line:blue;line.dotted;text:blue

class DahsedClass #line.dashed:palegreen
class DottedClass #line.dotted:blue
class BoldClass #line.bold
class ColorGradientClass #back:lightgreen|red;header:blue/red

@enduml

 

Above snippet generate below diagram.


 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment