Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

PlantUML: add inline color to the states in state diagram

Using #color notation, we can apply colors to the state Diagram.

inlineColor.txt

@startuml

left to right direction

state state1 #FF9876
state state2 #lightblue
state state3 #palegreen
state state4 #brown
state state5 #magenta

[*] --> state1
state1 --> state2
state2 --> state3
state3 --> state4
state4 --> state5
state5 --> [*]


@enduml

Above snippet generate below diagram.

 


 

You can apply two colors on the state to get color gradient affects.

 

colorGradient.txt

@startuml

left to right direction

state "initialization state" as state1 #red-green
state "running state" as state2 #green|blue

[*] --> state1
state1 --> state2
state2 --> [*]


@enduml

Above snippet generate below diagram.



  

Previous                                                    Next                                                    Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

PlantUML: add inline color to the states in state diagram

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×