HOME      NEWS      MAP

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

Colors

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

Parameter name Default value Color Comment
backgroundColor white Background of the page, or transparent
activityArrowColor #A80036 Color of arrows in activity diagrams
activityBackgroundColor #FEFECE Background of activities
activityBorderColor #A80036 Color of activity borders
activityStartColor black Starting circle in activity diagrams
activityEndColor black Ending circle in activity diagrams
activityBarColor black Synchronization bar in activity diagrams
actorBackgroundColor #FEFECE Head's color of actor
actorBorderColor #A80036 Color of actor borders
usecaseArrowColor #A80036 Color of arrows in usecase diagrams
usecaseBackgroundColor #FEFECE Background of usecases
usecaseBorderColor #A80036 Color of usecase borders in usecase diagrams
classArrowColor #A80036 Color of arrows in class diagrams
classBackgroundColor #FEFECE Background of classes/interface/enum in class diagrams
classBorderColor #A80036 Borders of classes/interface/enum in class diagrams
objectArrowColor #A80036 Color of arrows in object diagrams
objectBackgroundColor #FEFECE Background of object in object diagrams
objectBorderColor #A80036 Borders of object in object diagrams
packageBackgroundColor #FEFECE Background of packages in class diagrams
packageBorderColor #A80036 Borders of packages in class diagrams
stereotypeCBackgroundColor #ADD1B2 Background of class spots in class diagrams
stereotypeABackgroundColor #A9DCDF Background of abstract class spots in class diagrams
stereotypeIBackgroundColor #B4A7E5 Background of interface spots in class diagrams
stereotypeEBackgroundColor #EB937F Background of enum spots in class diagrams
componentArrowColor #A80036 Color of arrows in component diagrams
componentBackgroundColor #FEFECE Background of components
componentBorderColor #A80036 Borders of components
componentInterfaceBackgroundColor #FEFECE Background of interface in component diagrams
componentInterfaceBorderColor #A80036 Border of interface in component diagrams
noteBackgroundColor #FBFB77 Background of notes
noteBorderColor #A80036 Border of notes
stateBackgroundColor #FEFECE Background of states in state diagrams
stateBorderColor #A80036 Border of states in state diagrams
stateArrowColor #A80036 Colors of arrows in state diagrams
stateStartColor black Starting circle in state diagrams
stateEndColor black Ending circle in state diagrams
sequenceArrowColor #A80036 Color of arrows in sequence diagrams
sequenceDividerBackgroundColor #EEEEEE Background of divider in sequence diagrams
sequenceGroupBackgroundColor #EEEEEE Header color of alt/opt/loop in sequence diagrams
sequenceLifeLineBackgroundColor white Background of life line in sequence diagrams
sequenceLifeLineBorderColor #A80036 Border of life line in sequence diagrams
sequenceParticipantBackgroundColor #FEFECE Background of participant in sequence diagrams
sequenceParticipantBorderColor #A80036 Border of participant in sequence diagrams
sequenceBoxLineColor #A80036 Border of participant englobers in sequence diagrams
sequenceBoxBackgroundColor #DDDDDD Background 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 name Default value Comment
activityFontColor
activityFontSize
activityFontStyle
activityFontName
black
14
plain
Used for activity box
activityArrowFontColor
activityArrowFontSize
activityArrowFontStyle
activityArrowFontName
black
13
plain
Used for text on arrows in activity diagrams
circledCharacterFontColor
circledCharacterFontSize
circledCharacterFontStyle
circledCharacterFontName
circledCharacterRadius
black
17
bold
Courier
11
Used for text in circle for class, enum & others
classArrowFontColor
classArrowFontSize
classArrowFontStyle
classArrowFontName
black
10
plain
Used for text on arrows in class diagrams
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
objectArrowFontColor
objectArrowFontSize
objectArrowFontStyle
objectArrowFontName
black
10
plain
Used for text on arrows in object diagrams
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
componentArrowFontColor
componentArrowFontSize
componentArrowFontStyle
componentArrowFontName
black
13
plain
Used for text on arrows in component diagrams
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
sequenceActorFontColor
sequenceActorFontSize
sequenceActorFontStyle
sequenceActorFontName
black
13
plain
Used for actor in sequence diagrams
sequenceDividerFontColor
sequenceDividerFontSize
sequenceDividerFontStyle
sequenceDividerFontName
black
13
bold
Used for text on dividers in sequence diagrams
sequenceArrowFontColor
sequenceArrowFontSize
sequenceArrowFontStyle
sequenceArrowFontName
black
13
plain
Used for text on arrows 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
stateArrowFontColor
stateArrowFontSize
stateArrowFontStyle
stateArrowFontName
black
13
plain
Used for text on arrows 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
usecaseActorFontColor
usecaseActorFontSize
usecaseActorFontStyle
usecaseActorFontName
black
14
plain
Used for actor labels in usecase diagrams
usecaseActorStereotypeFontColor
usecaseActorStereotypeFontSize
usecaseActorStereotypeFontStyle
usecaseActorStereotypeFontName
black
14
italic
Used for stereotype for actor
usecaseArrowFontColor
usecaseArrowFontSize
usecaseArrowFontStyle
usecaseArrowFontName
black
13
plain
Used for text on arrows in usecase diagrams
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 name Default value Comment
sequenceMessageAlign left Used for messages in sequence diagrams
sequenceReferenceAlign center Used 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

Black and White

You can force the use of a black&white output using the 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

Examples

You can click on image to view the sources.

HOME      NEWS      MAP