''
'' Colors representing the black knight
''
'' Author: Brett Schwarz

!$THEME = "black-knight"

!if %not(%variable_exists("$BGCOLOR"))
!$BGCOLOR = "transparent"
!endif

skinparam backgroundColor $BGCOLOR
skinparam useBetaStyle false

''
'' Colors taken from the _default_colors.scss file
''
!$PRIMARY = "#303030"
!$PRIMARY_DARK = "#262626"
!$PRIMARY_LIGHT = "#595959"
' !$PRIMARY_TEXT = "#0060a8"
!$PRIMARY_TEXT = "#fff200"
!$SECONDARY = "#484848"
!$SECONDARY_DARK = "#3a3a3a"
!$SECONDARY_LIGHT = "#6d6d6d"
!$SECONDARY_TEXT = "#fefefe"
!$SUCCESS = "#00FF00"
!$SUCCESS_DARK = "#00cc00"
!$SUCCESS_LIGHT = "#33ff33"
!$INFO = "#0060a8"
!$INFO_DARK = "#004d86"
!$INFO_LIGHT = "#3380b9"
!$WARNING = "#ff8000"
!$WARNING_DARK = "#cc6600"
!$WARNING_LIGHT = "#ff9933"
!$WARNING_TEXT = "#222222"
!$DANGER = "#ff0000"
!$DANGER_DARK = "#cc0000"
!$DANGER_LIGHT = "#ff3333"
!$LIGHT = "#fff200"
!$DARK = "#484848"

!procedure $success($msg)
  <font color=$SUCCESS><b>$msg
!endprocedure

!procedure $failure($msg)
  <font color=$DANGER><b>$msg
!endprocedure

!procedure $warning($msg)
  <font color=$WARNING><b>$msg
!endprocedure

!procedure $primary_scheme()
	FontColor $PRIMARY_TEXT
	BorderColor $PRIMARY_DARK
	BackgroundColor $PRIMARY_LIGHT-$PRIMARY_DARK
!endprocedure

' skinparam  {
'     defaultFontName   "Verdana"
'     defaultFontSize   12
'     defaultTextAlignment center
'     shadowing false
'     RoundCorner 10
'     TitleFontSize 18
'     ' TitleFontColor $PRIMARY_TEXT
' }

''
'' Global Default Values
''
skinparam defaultFontName       "Verdana"
skinparam defaultFontSize       12
skinparam dpi                   100
skinparam shadowing             false
skinparam roundcorner           8
skinparam ParticipantPadding    40
skinparam BoxPadding            40
skinparam Padding               5
skinparam ArrowColor            $DARK
skinparam stereotype {
    CBackgroundColor $SECONDARY_DARK
    CBorderColor $SECONDARY_LIGHT
    ABackgroundColor $SUCCESS_LIGHT
    ABorderColor $SUCCESS_DARK
    IBackgroundColor $DANGER_LIGHT
    IBorderColor $DANGER_DARK
    EBackgroundColor $WARNING_LIGHT
    EBorderColor $WARNING_DARK
    NBackgroundColor $INFO_LIGHT
    NBorderColor $INFO_DARK
}
skinparam title {
	FontColor	                 $SECONDARY_TEXT
	BorderColor	                 $SECONDARY_DARK
	FontSize	    	         20
	BorderRoundCorner            8
	BorderThickness 	         1
	BackgroundColor              $SECONDARY_LIGHT-$SECONDARY
}


skinparam legend {
	BackgroundColor $PRIMARY
	BorderColor $PRIMARY_DARK
	FontColor $PRIMARY_TEXT
}

!startsub swimlane
skinparam swimlane {
	BorderColor $INFO
	BorderThickness 2
	TitleBackgroundColor  $SECONDARY_LIGHT-$SECONDARY
	TitleFontColor $PRIMARY_TEXT
}
!endsub

!startsub activity
skinparam activity {
	$primary_scheme()
	BarColor $SUCCESS
	StartColor $INFO
	EndColor $INFO
	''
	DiamondBackgroundColor $SECONDARY_LIGHT-$SECONDARY_DARK
  	DiamondBorderColor $SECONDARY_DARK
  	DiamondFontColor $SECONDARY_TEXT
}
!endsub

!startsub participant

skinparam participant {
	$primary_scheme()
	ParticipantBorderThickness 2
}
!endsub

!startsub actor

skinparam actor {
	$primary_scheme()
}
!endsub

!startsub arrow
skinparam arrow {
	Thickness 3
	Color $PRIMARY
	FontColor $FGCOLOR
}
!endsub


!startsub sequence

skinparam sequence {
	BorderColor $PRIMARY
	' For some reason sequence title font color does not pick up from global
	TitleFontColor $PRIMARY
	BackgroundColor $BGCOLOR
	StartColor $PRIMARY
	EndColor $PRIMARY
	''
	BoxBackgroundColor $BGCOLOR
	BoxBorderColor $DARK
	BoxFontColor $DARK
	''
	LifeLineBorderColor $SECONDARY
	LifeLineBorderThickness 2
	LifeLineBackgroundColor $SECONDARY_DARK
	''
	GroupBorderColor $DARK
	GroupFontColor $DARK
	GroupHeaderFontColor $INFO
	GroupBackgroundColor $SECONDARY
	GroupBodyBackgroundColor $BGCOLOR
	GroupHeaderBackgroundColor $BGCOLOR
	''
	DividerBackgroundColor $DARK
    DividerBorderColor $DARK
    DividerBorderThickness 2
    DividerFontColor $LIGHT
	''
	ReferenceBackgroundColor $BGCOLOR
	ReferenceBorderColor $DARK
	ReferenceFontColor $SECONDARY_TEXT
	ReferenceHeaderFontColor $INFO
	ReferenceHeaderBackgroundColor $SECONDARY
}
!endsub

!startsub partition

skinparam partition {
	BorderColor $PRIMARY
	FontColor $PRIMARY_LIGHT
	BackgroundColor $BGCOLOR
}
!endsub

!startsub collections
skinparam collections {
	$primary_scheme()
}
!endsub

!startsub control
skinparam control {
	$primary_scheme()
}
!endsub

!startsub entity
skinparam entity {
	$primary_scheme()
}
!endsub

!startsub boundary
skinparam boundary {
	$primary_scheme()
}
!endsub

!startsub agent
skinparam agent {
	BackgroundColor $WARNING
	BorderColor $WARNING_LIGHT
	FontColor $DARK
}
!endsub

!startsub note

skinparam note {
	BorderThickness 1
	BackgroundColor $INFO
	BorderColor $INFO_DARK
	FontColor $WHITE
}
!endsub

!startsub artifact

skinparam artifact {
	BackgroundColor $DARK
	BorderColor $DARK_DARK
	FontColor $LIGHT
}
!endsub

!startsub component

skinparam component {
	$primary_scheme()
}
!endsub

!startsub interface

skinparam interface {
	BackgroundColor  $DANGER_DARK
	BorderColor  $DANGER
	FontColor $DARK
}
!endsub

!startsub storage

skinparam storage {
	BackgroundColor $WARNING
  	BorderColor $WARNING_DARK
	FontColor $WARNING_TEXT
}
!endsub

!startsub node

skinparam node {
	BackgroundColor $BGCOLOR
	BorderColor $PRIMARY_LIGHT
	FontColor $PRIMARY_TEXT
}
!endsub

!startsub cloud

skinparam cloud {
	BackgroundColor transparent
	BorderColor $DARK
	FontColor $LIGHT
}
!endsub

!startsub database

skinparam database {
	$primary_scheme()
}
!endsub

!startsub class

skinparam class {
	$primary_scheme()
	HeaderBackgroundColor $PRIMARY_LIGHT
	StereotypeFontColor $DARK
	BorderThickness 1
	AttributeFontColor $LIGHT
	AttributeFontSize 11
}
!endsub

!startsub object

skinparam object {
	$primary_scheme()
	StereotypeFontColor $DARK
	BorderThickness 1
	AttributeFontColor $SECONDARY_TEXT
	AttributeFontSize 11
}
!endsub

!startsub usecase

skinparam usecase {
	$primary_scheme()
	BorderThickness 2
	StereotypeFontColor $PRIMARY
}
!endsub

!startsub rectangle

skinparam rectangle {
	$primary_scheme()
	BackgroundColor $BGCOLOR
	BorderThickness 2
	StereotypeFontColor $PRIMARY
}
!endsub

!startsub package

skinparam package {
	$primary_scheme()
	BackgroundColor $BGCOLOR
	BorderThickness 2
}
!endsub

!startsub folder

skinparam folder {
	BackgroundColor $SECONDARY_LIGHT
  	BorderColor $WARNING
	FontColor $WARNING
	BorderThickness 2
}
!endsub

!startsub frame

skinparam frame {
	BackgroundColor $SECONDARY_LIGHT
  	BorderColor $INFO
	FontColor $INFO
	BorderThickness 2
}
!endsub

!startsub state

skinparam state {
	$primary_scheme()
	StartColor $INFO
	EndColor $INFO
	AttributeFontColor $SECONDARY_TEXT
	AttributeFontSize 11
}
!endsub

!startsub queue

skinparam queue {
	$primary_scheme()
}
!endsub

!startsub card

skinparam card {
	BackgroundColor $INFO
	BorderColor $INFO_DARK
	FontColor $INFO_TEXT
}
!endsub

!startsub file

skinparam file {
	BackgroundColor $SECONDARY_LIGHT-$SECONDARY
	BorderColor $INFO
	FontColor $SECONDARY_TEXT
}
!endsub

!startsub stack

skinparam stack {
	$primary_scheme()
}
!endsub

!if %variable_exists("NEWSTYLE")
<style>
wbsDiagram {
    LineColor $PRIMARY
    BorderThickness 3
    BackgroundColor $LIGHT
    FontColor $PRIMARY_TEXT
    :depth(0) {
        fontSize 16
        fontStyle bold
        fontColor $SECONDARY
    }
    :depth(1) {
        fontSize 14
        padding 5
        fontStyle bold
    }
    :depth(2) {
        fontSize 12
        padding 4
    }
    :depth(3) {
        fontSize 11
        padding 3
        fontColor $INFO
    }

}
</style>
!endif
