Tuesday 14 May 2024

PlantUML: set color for single activity in activity diagram

Syntax

#color :activity;

 

Example

#PaleGreen :User enter username and password;

 

Using above inline style, we can set color for an activity in the activity diagram.

 

colorForSingleActivity.txt

@startuml

skinparam ActivityBackgroundColor #LightSalmon

title "User login flow"

start

#PaleGreen :User enter username and password;

if (credentials are correct) then (yes)
	: Take user to the home page;
else (no)
    : Take user to the login page and **display error message**;
endif

stop

@enduml

Above snippet generate below diagram.



 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment