Skinparam command

You can change colors and font of the drawing using the skinparam command.

Example:

skinparam backgroundColor transparent

Usage

You can use this command :

Nested

To avoid repetition, it is possible to nest definition. So the following definition :

skinparam xxxxParam1 value1
skinparam xxxxParam2 value2
skinparam xxxxParam3 value3
skinparam xxxxParam4 value4
		

is strictly equivalent to:

skinparam xxxx {
  Param1 value1
  Param2 value2
  Param3 value3
  Param4 value4
}
		

List

Since the documentation is not always up to date, you can have the complete list of parameters using this command:

java -jar plantuml.jar -language

Black and White

You can force the use of a black&white output using skinparam monochrome true command.
@startuml

skinparam monochrome true

actor User
participant "First Class" as A
participant "Second Class" as B
participant "Last Class" as C

User -> A: DoWork
activate A

A -> B: Create Request
activate B

B -> C: DoWork
activate C
C --> B: WorkDone
destroy C

B --> A: Request Created
deactivate B

A --> User: Done
deactivate A

@enduml
monochrome UML sequence diagram

Reverse colors

You can force the use of a black&white output using skinparam monochrome reverse command. This can be useful for black background environment.
@startuml

skinparam monochrome reverse

actor User
participant "First Class" as A
participant "Second Class" as B
participant "Last Class" as C

User -> A: DoWork
activate A

A -> B: Create Request
activate B

B -> C: DoWork
activate C
C --> B: WorkDone
destroy C

B --> A: Request Created
deactivate B

A --> User: Done
deactivate A

@enduml
video reversed

Colors

You can use either standard color name or RGB code.
transparent can only be used for background of the image.

Parameter nameDefault valueColorComment
backgroundColorwhiteBackground of the page, or transparent
arrowColor#A80036Color of arrows
activityBackgroundColor#FEFECEBackground of activities
activityBorderColor#A80036Color of activity borders
activityDiamondBackgroundColor#FEFECEBackground of diamond
activityDiamondBorderColor#A80036Color of diamond borders
activityStartColorblackStarting circle in activity diagrams
activityEndColorblackEnding circle in activity diagrams
activityBarColorblackSynchronization bar in activity diagrams
actorBackgroundColor#FEFECEHead's color of actor
actorBorderColor#A80036Color of actor borders
usecaseBackgroundColor#FEFECEBackground of usecases
usecaseBorderColor#A80036Color of usecase borders in usecase diagrams
classBackgroundColor#FEFECEBackground of classes/interface/enum in class diagrams
classBorderColor#A80036Borders of classes/interface/enum in class diagrams
objectBackgroundColor#FEFECEBackground of object in object diagrams
objectBorderColor#A80036Borders of object in object diagrams
packageBackgroundColor#FEFECEBackground of packages in class diagrams
packageBorderColor#A80036Borders of packages in class diagrams
stereotypeCBackgroundColor#ADD1B2Background of class spots in class diagrams
stereotypeABackgroundColor#A9DCDFBackground of abstract class spots in class diagrams
stereotypeIBackgroundColor#B4A7E5Background of interface spots in class diagrams
stereotypeEBackgroundColor#EB937FBackground of enum spots in class diagrams
componentBackgroundColor#FEFECEBackground of components
componentBorderColor#A80036Borders of components
componentInterfaceBackgroundColor#FEFECEBackground of interface in component diagrams
componentInterfaceBorderColor#A80036Border of interface in component diagrams
noteBackgroundColor#FBFB77Background of notes
noteBorderColor#A80036Border of notes
stateBackgroundColor#FEFECEBackground of states in state diagrams
stateBorderColor#A80036Border of states in state diagrams
stateStartColorblackStarting circle in state diagrams
stateEndColorblackEnding circle in state diagrams
sequenceDividerBackgroundColor#EEEEEEBackground of divider in sequence diagrams
sequenceGroupBackgroundColor#EEEEEEHeader color of alt/opt/loop in sequence diagrams
sequenceLifeLineBackgroundColorwhiteBackground of life line in sequence diagrams
sequenceLifeLineBorderColor#A80036Border of life line in sequence diagrams
sequenceParticipantBackgroundColor#FEFECEBackground of participant in sequence diagrams
sequenceParticipantBorderColor#A80036Border of participant in sequence diagrams
sequenceBoxLineColor#A80036Border of participant englobers in sequence diagrams
sequenceBoxBackgroundColor#DDDDDDBackground of participant englobers in sequence diagrams

Font color, name and size

You can change the font for the drawing using xxxFontColor, xxxFontSize and xxxFontName parameters.

Example:

skinparam classFontColor red
skinparam classFontSize 10
skinparam classFontName Aapex
You can also change the default font for all fonts using skinparam defaultFontName.

Example:

skinparam defaultFontName Aapex

Please note the fontname is highly system dependent, so do not over use it, if you look for portability. Helvetica and Courier should be available on all system.

Param nameDefault valueComment
activityDiamondFontColor
activityDiamondFontSize
activityDiamondFontStyle
activityDiamondFontName
black
11
plain
Used for activity box
activityFontColor
activityFontSize
activityFontStyle
activityFontName
black
14
plain
Used for activity box
activityFontColor
activityFontSize
activityFontStyle
activityFontName
black
14
plain
Used for activity box
arrowFontColor
arrowFontSize
arrowFontStyle
arrowFontName
black
13/11
plain
Used for text on arrows
circledCharacterFontColor
circledCharacterFontSize
circledCharacterFontStyle
circledCharacterFontName
circledCharacterRadius
black
17
bold
Courier
11
Used for text in circle for class, enum & others
classAttributeFontColor
classAttributeFontSize
classAttributeIconSize
classAttributeFontStyle
classAttributeFontName
black
10
10
plain
Class attributes and methods
classFontColor
classFontSize
classFontStyle
classFontName
black
12
plain
Used for classes name
classStereotypeFontColor
classStereotypeFontSize
classStereotypeFontStyle
classStereotypeFontName
black
12
italic
Used for stereotype in classes
objectAttributeFontColor
objectAttributeFontSize
objectAttributeFontStyle
objectAttributeFontName
black
10
plain
Object attributes
objectFontColor
objectFontSize
objectFontStyle
objectFontName
black
12
plain
Used for object name
objectStereotypeFontColor
objectStereotypeFontSize
objectStereotypeFontStyle
objectStereotypeFontName
black
12
italic
Used for stereotype in objects
componentFontColor
componentFontSize
componentFontStyle
componentFontName
black
14
plain
Used for components name
componentStereotypeFontColor
componentStereotypeFontSize
componentStereotypeFontStyle
componentStereotypeFontName
black
14
italic
Used for stereotype in components
noteFontColor
noteFontSize
noteFontStyle
noteFontName
black
13
plain
Used for notes in all diagrams but sequence diagrams
packageFontColor
packageFontSize
packageFontStyle
packageFontName
black
14
plain
Used for package and partition names
sequenceDividerFontColor
sequenceDividerFontSize
sequenceDividerFontStyle
sequenceDividerFontName
black
13
bold
Used for text on dividers in sequence diagrams
sequenceGroupFontColor
sequenceGroupFontSize
sequenceGroupFontStyle
sequenceGroupFontName
black
11
bold
Used for text for "else" in sequence diagrams
sequenceGroupHeaderFontColor
sequenceGroupHeaderFontSize
sequenceGroupHeaderFontStyle
sequenceGroupHeaderFontName
black
13
bold
Used for text for "alt/opt/loop" headers in sequence diagrams
sequenceParticipantFontColor
sequenceParticipantFontSize
sequenceParticipantFontStyle
sequenceParticipantFontName
black
13
plain
Used for text on participant in sequence diagrams
sequenceStereotypeFontColor
sequenceStereotypeFontSize
sequenceStereotypeFontStyle
sequenceStereotypeFontName
black
14
italic
Used for stereotypes in sequence diagrams
sequenceTitleFontColor
sequenceTitleFontSize
sequenceTitleFontStyle
sequenceTitleFontName
black
13
bold
Used for titles in sequence diagrams
titleFontColor
titleFontSize
titleFontStyle
titleFontName
black
18
plain
Used for titles in all diagrams but sequence diagrams
stateFontColor
stateFontSize
stateFontStyle
stateFontName
black
14
plain
Used for states in state diagrams
stateAttributeFontColor
stateAttributeFontSize
stateAttributeFontStyle
stateAttributeFontName
black
12
plain
Used for states description in state diagrams
usecaseFontColor
usecaseFontSize
usecaseFontStyle
usecaseFontName
black
14
plain
Used for usecase labels in usecase diagrams
usecaseStereotypeFontColor
usecaseStereotypeFontSize
usecaseStereotypeFontStyle
usecaseStereotypeFontName
black
14
italic
Used for stereotype in usecase
actorFontColor
actorFontSize
actorFontStyle
actorFontName
black
14
plain
Used for actor labels in usecase diagrams
actorStereotypeFontColor
actorStereotypeFontSize
actorStereotypeFontStyle
actorStereotypeFontName
black
14
italic
Used for stereotype for actor
footerFontColor
footerFontSize
footerFontStyle
footerFontName
black
10
plain
Used for footer
headerFontColor
headerFontSize
headerFontStyle
headerFontName
black
10
plain
Used for header

Text Alignement

Text alignement can be set up to left, right or center. You can also use direction or reverseDirection values for sequenceMessageAlign which align text depending on arrow direction.

Param nameDefault valueComment
sequenceMessageAlignleftUsed for messages in sequence diagrams
sequenceReferenceAligncenterUsed for "ref over" in sequence diagrams
@startuml
skinparam sequenceMessageAlign center
Alice -> Bob : Hi
Alice -> Bob : This is very long
@enduml
message alignment in UML sequence diagram

Examples

You can click on image to view the sources.