PlantUML has good number of built-in themes to change the look and feel of a diagram.
How to get list of all themes?
'help themes' command print al the available themes in your PlantUML version.
allThemes.txt
@startuml
help themes
@enduml
How to use a theme?
Using !theme directive, we can set a theme to the diagram.
Example
!theme united
marsTheme.txt
@startuml !theme mars left to right direction skinparam roundCorner 50 title "Operating System Process states" state New #magenta state Ready #palegreen state Running #green state "Suspend wait" as SW #FFBA77 state "Wait / block" as WB #FFDF77 state "Suspend ready" as SR #FFFF77 state Termination #red [*] --> New New --> Ready Ready --> Running : Schedule/dispatch Running --> Ready : Priority/time elapse Running --> Termination : completion Running --> WB : I/O Request WB --> Ready : I/O completion WB --> SW : Suspend SW --> WB : Resume SW --> SR : Completed I/O, but still in suspend SR --> Ready : Resume Ready --> SR : Suspend Termination --> [*] @enduml
Above snippet generate below diagram.
crt-green theme
sketchy theme
Materia theme
Previous Next Home
No comments:
Post a Comment