!$THEME = "C4_brown"

!$ELEMENT_FONT_COLOR ?= "#FFFFFF"

!$PERSON_FONT_COLOR ?= $ELEMENT_FONT_COLOR 
!$PERSON_BG_COLOR ?= "#7B4208" 
!$PERSON_BORDER_COLOR ?= "#6F3B07" 
!$EXTERNAL_PERSON_FONT_COLOR ?= $ELEMENT_FONT_COLOR 
!$EXTERNAL_PERSON_BG_COLOR ?= "#686868" 
!$EXTERNAL_PERSON_BORDER_COLOR ?= "#8A8A8A" 

!$SYSTEM_FONT_COLOR ?= $ELEMENT_FONT_COLOR 
!$SYSTEM_BG_COLOR ?= "#BD6811" 
!$SYSTEM_BORDER_COLOR ?= "#C07F3C" 
!$EXTERNAL_SYSTEM_FONT_COLOR ?= $ELEMENT_FONT_COLOR 
!$EXTERNAL_SYSTEM_BG_COLOR ?= "#999999" 
!$EXTERNAL_SYSTEM_BORDER_COLOR ?= "#8A8A8A" 

!$CONTAINER_FONT_COLOR ?= $ELEMENT_FONT_COLOR 
!$CONTAINER_BG_COLOR ?= "#D58D43" 
!$CONTAINER_BORDER_COLOR ?= "#C07F3C" 
!$EXTERNAL_CONTAINER_FONT_COLOR ?= $ELEMENT_FONT_COLOR 
!$EXTERNAL_CONTAINER_BG_COLOR ?= "#B3B3B3" 
!$EXTERNAL_CONTAINER_BORDER_COLOR ?= "#A6A6A6" 

!$COMPONENT_FONT_COLOR ?= "#000000" 
!$COMPONENT_BG_COLOR ?= "#F0BB85" 
!$COMPONENT_BORDER_COLOR ?= "#D8A878" 
!$EXTERNAL_COMPONENT_FONT_COLOR ?= $COMPONENT_FONT_COLOR 
!$EXTERNAL_COMPONENT_BG_COLOR ?= "#CCCCCC" 
!$EXTERNAL_COMPONENT_BORDER_COLOR ?= "#BFBFBF" 

!$NODE_FONT_COLOR ?= "#000000"
!$NODE_BG_COLOR ?= "#FFFFFF"
!$NODE_BORDER_COLOR ?= "#A2A2A2"

' <<<<<<<<<<<<< sequence diagram is styled via skinparam and style

' $BOUNDARY_BG_COLOR... have to be defined in theme itself that it can be used in styles,...
' (no default values which are defined in C4.puml) 
' If skinparams and styles are defined with concrete values no variables are required 
!$BOUNDARY_BG_COLOR ?= "transparent"
!$BOUNDARY_COLOR ?= "#444444"
!$ARROW_COLOR ?= "#666666"

' replace transparent with concrete background that it can be used as font color too
!if ($BOUNDARY_BG_COLOR == "transparent")
  !$SEQUENCE_BG_COLOR = white
!else
  !$SEQUENCE_BG_COLOR = $BOUNDARY_BG_COLOR
!endif

' "C4 styled" default is no foot boxes
hide footbox
' "C4 styled" default is that lifeline is arrow color
skinparam SequenceLifelineBorderColor $ARROW_COLOR

skinparam SequenceGroupBodyBackgroundColor $SEQUENCE_BG_COLOR
skinparam SequenceGroupFontColor $BOUNDARY_COLOR
skinparam SequenceGroupBackgroundColor $BOUNDARY_COLOR
skinparam SequenceGroupHeaderFontColor $SEQUENCE_BG_COLOR
skinparam SequenceGroupBorderColor $BOUNDARY_COLOR

skinparam SequenceReferenceBackgroundColor $SEQUENCE_BG_COLOR
skinparam SequenceReferenceFontColor $BOUNDARY_COLOR
skinparam SequenceReferenceHeaderBackgroundColor $BOUNDARY_COLOR
' VIA STYLE
' skinparam SequenceReferenceHeaderFontColor $SEQUENCE_BG_COLOR
<style>
referenceHeader {
  fontcolor $SEQUENCE_BG_COLOR
}
</style>
skinparam SequenceReferenceBorderColor $BOUNDARY_COLOR

skinparam SequenceDividerBackgroundColor $SEQUENCE_BG_COLOR
skinparam SequenceDividerFontColor $BOUNDARY_COLOR
skinparam SequenceDividerBorderColor $BOUNDARY_COLOR

' VIA STYLE
' skinparam SequenceDelayFontColor green
<style>
sequenceDiagram {
  delay {
    FontColor $BOUNDARY_COLOR
  }
}
</style>

' <<<<<<<<<<<<< end sequence diagram

