mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-16 10:15:13 +00:00
Merge pull request #553 from bschwarz/black-knight-updates
feat: updates theme to use new lighten and darken functions, and some…
This commit is contained in:
commit
dc6603be50
@ -1,62 +1,101 @@
|
|||||||
''
|
''
|
||||||
'' Colors representing the black knight
|
'' Colors representing the black knight
|
||||||
|
'' Looks best on a dark background
|
||||||
''
|
''
|
||||||
'' Author: Brett Schwarz
|
'' Author: Brett Schwarz
|
||||||
|
''
|
||||||
|
''
|
||||||
!$THEME = "black-knight"
|
!$THEME = "black-knight"
|
||||||
|
''
|
||||||
|
'' Assume if the background is transparent, that the
|
||||||
|
'' background will be dark for this theme
|
||||||
|
''
|
||||||
|
!assume transparent dark
|
||||||
|
''
|
||||||
|
'' If no background color is given, then default transparent
|
||||||
|
''
|
||||||
!if %not(%variable_exists("$BGCOLOR"))
|
!if %not(%variable_exists("$BGCOLOR"))
|
||||||
!$BGCOLOR = "transparent"
|
!$BGCOLOR = "transparent"
|
||||||
!endif
|
!endif
|
||||||
|
''
|
||||||
|
''
|
||||||
|
'' If no gradient is given, default to 20
|
||||||
|
''
|
||||||
|
!if %not(%variable_exists("$GRADIENT"))
|
||||||
|
!$GRADIENT = 20
|
||||||
|
!endif
|
||||||
|
''
|
||||||
skinparam backgroundColor $BGCOLOR
|
skinparam backgroundColor $BGCOLOR
|
||||||
skinparam useBetaStyle false
|
skinparam useBetaStyle false
|
||||||
|
|
||||||
''
|
''
|
||||||
'' Colors taken from the _default_colors.scss file
|
'' Default color palette to be used in the definitions below
|
||||||
''
|
''
|
||||||
!$PRIMARY = "#303030"
|
!$PRIMARY = "#303030"
|
||||||
!$PRIMARY_DARK = "#262626"
|
!$PRIMARY_DARK = %darken($PRIMARY, $GRADIENT)
|
||||||
!$PRIMARY_LIGHT = "#595959"
|
!$PRIMARY_LIGHT = %lighten($PRIMARY, $GRADIENT)
|
||||||
' !$PRIMARY_TEXT = "#0060a8"
|
|
||||||
!$PRIMARY_TEXT = "#fff200"
|
!$PRIMARY_TEXT = "#fff200"
|
||||||
!$SECONDARY = "#484848"
|
!$SECONDARY = "#484848"
|
||||||
!$SECONDARY_DARK = "#3a3a3a"
|
!$SECONDARY_DARK = %darken($SECONDARY, $GRADIENT)
|
||||||
!$SECONDARY_LIGHT = "#6d6d6d"
|
!$SECONDARY_LIGHT = %lighten($SECONDARY, $GRADIENT)
|
||||||
!$SECONDARY_TEXT = "#fefefe"
|
!$SECONDARY_TEXT = "#fefefe"
|
||||||
!$SUCCESS = "#00FF00"
|
!$SUCCESS = "#00FF00"
|
||||||
!$SUCCESS_DARK = "#00cc00"
|
!$SUCCESS_DARK = %darken($SUCCESS, $GRADIENT)
|
||||||
!$SUCCESS_LIGHT = "#33ff33"
|
!$SUCCESS_LIGHT = %lighten($SUCCESS, $GRADIENT)
|
||||||
|
!$SUCCESS_TEXT = "ffffff"
|
||||||
!$INFO = "#0060a8"
|
!$INFO = "#0060a8"
|
||||||
!$INFO_DARK = "#004d86"
|
!$INFO_DARK = %darken($INFO, $GRADIENT)
|
||||||
!$INFO_LIGHT = "#3380b9"
|
!$INFO_LIGHT = %lighten($INFO, $GRADIENT)
|
||||||
|
!$INFO_TEXT = "ffffff"
|
||||||
!$WARNING = "#ff8000"
|
!$WARNING = "#ff8000"
|
||||||
!$WARNING_DARK = "#cc6600"
|
!$WARNING_DARK = %darken($WARNING, $GRADIENT)
|
||||||
!$WARNING_LIGHT = "#ff9933"
|
!$WARNING_LIGHT = %lighten($WARNING, $GRADIENT)
|
||||||
!$WARNING_TEXT = "#222222"
|
!$WARNING_TEXT = "#222222"
|
||||||
!$DANGER = "#ff0000"
|
!$DANGER = "#ff0000"
|
||||||
!$DANGER_DARK = "#cc0000"
|
!$DANGER_DARK = %darken($DANGER, $GRADIENT)
|
||||||
!$DANGER_LIGHT = "#ff3333"
|
!$DANGER_LIGHT = %lighten($DANGER, $GRADIENT)
|
||||||
|
!$DANGER_TEXT = "ffffff"
|
||||||
!$LIGHT = "#fff200"
|
!$LIGHT = "#fff200"
|
||||||
!$DARK = "#484848"
|
!$DARK = "#484848"
|
||||||
|
''
|
||||||
|
'' proc to highlight text in the success color
|
||||||
|
''
|
||||||
!procedure $success($msg)
|
!procedure $success($msg)
|
||||||
<font color=$SUCCESS><b>$msg
|
<font color=$SUCCESS><b>$msg
|
||||||
!endprocedure
|
!endprocedure
|
||||||
|
''
|
||||||
|
'' proc to highlight text in the danger color
|
||||||
|
''
|
||||||
!procedure $failure($msg)
|
!procedure $failure($msg)
|
||||||
<font color=$DANGER><b>$msg
|
<font color=$DANGER><b>$msg
|
||||||
!endprocedure
|
!endprocedure
|
||||||
|
''
|
||||||
|
'' proc to highlight text in the warning color
|
||||||
|
''
|
||||||
!procedure $warning($msg)
|
!procedure $warning($msg)
|
||||||
<font color=$WARNING><b>$msg
|
<font color=$WARNING><b>$msg
|
||||||
!endprocedure
|
!endprocedure
|
||||||
|
''
|
||||||
|
'' proc to highlight text in the info color
|
||||||
|
''
|
||||||
|
!procedure $info($msg)
|
||||||
|
<font color=$INFO><b>$msg
|
||||||
|
!endprocedure
|
||||||
|
''
|
||||||
|
'' proc to generate color scheme for primary color
|
||||||
|
''
|
||||||
!procedure $primary_scheme()
|
!procedure $primary_scheme()
|
||||||
FontColor $PRIMARY_TEXT
|
FontColor $PRIMARY_TEXT
|
||||||
BorderColor $PRIMARY_DARK
|
BorderColor $PRIMARY_DARK
|
||||||
BackgroundColor $PRIMARY_LIGHT-$PRIMARY_DARK
|
BackgroundColor $PRIMARY_LIGHT-$PRIMARY_DARK
|
||||||
!endprocedure
|
!endprocedure
|
||||||
|
''
|
||||||
|
'' proc to generate color scheme for secondary color
|
||||||
|
''
|
||||||
|
!procedure $secondary_scheme()
|
||||||
|
FontColor $SECONDARY_TEXT
|
||||||
|
BorderColor $SECONDARY_DARK
|
||||||
|
BackgroundColor $SECONDARY_LIGHT-$SECONDARY_DARK
|
||||||
|
!endprocedure
|
||||||
|
|
||||||
skinparam {
|
skinparam {
|
||||||
defaultFontName "Verdana"
|
defaultFontName "Verdana"
|
||||||
@ -92,6 +131,7 @@ skinparam stereotype {
|
|||||||
NBackgroundColor $INFO_LIGHT
|
NBackgroundColor $INFO_LIGHT
|
||||||
NBorderColor $INFO_DARK
|
NBorderColor $INFO_DARK
|
||||||
}
|
}
|
||||||
|
|
||||||
skinparam title {
|
skinparam title {
|
||||||
FontColor $SECONDARY_TEXT
|
FontColor $SECONDARY_TEXT
|
||||||
BorderColor $SECONDARY_DARK
|
BorderColor $SECONDARY_DARK
|
||||||
@ -101,7 +141,6 @@ skinparam title {
|
|||||||
BackgroundColor $SECONDARY_LIGHT-$SECONDARY
|
BackgroundColor $SECONDARY_LIGHT-$SECONDARY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
skinparam legend {
|
skinparam legend {
|
||||||
BackgroundColor $PRIMARY
|
BackgroundColor $PRIMARY
|
||||||
BorderColor $PRIMARY_DARK
|
BorderColor $PRIMARY_DARK
|
||||||
@ -109,7 +148,7 @@ skinparam legend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
!startsub swimlane
|
!startsub swimlane
|
||||||
skinparam swimlane {
|
skinparam swimlane {
|
||||||
BorderColor $INFO
|
BorderColor $INFO
|
||||||
BorderThickness 2
|
BorderThickness 2
|
||||||
TitleBackgroundColor $SECONDARY_LIGHT-$SECONDARY
|
TitleBackgroundColor $SECONDARY_LIGHT-$SECONDARY
|
||||||
@ -131,7 +170,6 @@ skinparam activity {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub participant
|
!startsub participant
|
||||||
|
|
||||||
skinparam participant {
|
skinparam participant {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
ParticipantBorderThickness 2
|
ParticipantBorderThickness 2
|
||||||
@ -139,14 +177,12 @@ skinparam participant {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub actor
|
!startsub actor
|
||||||
|
|
||||||
skinparam actor {
|
skinparam actor {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub arrow
|
!startsub arrow
|
||||||
|
|
||||||
skinparam arrow {
|
skinparam arrow {
|
||||||
Thickness 3
|
Thickness 3
|
||||||
Color $PRIMARY
|
Color $PRIMARY
|
||||||
@ -154,9 +190,7 @@ skinparam arrow {
|
|||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
|
|
||||||
!startsub sequence
|
!startsub sequence
|
||||||
|
|
||||||
skinparam sequence {
|
skinparam sequence {
|
||||||
BorderColor $PRIMARY
|
BorderColor $PRIMARY
|
||||||
' For some reason sequence title font color does not pick up from global
|
' For some reason sequence title font color does not pick up from global
|
||||||
@ -177,6 +211,7 @@ skinparam sequence {
|
|||||||
GroupFontColor $DARK
|
GroupFontColor $DARK
|
||||||
GroupHeaderFontColor $INFO
|
GroupHeaderFontColor $INFO
|
||||||
GroupBackgroundColor $SECONDARY
|
GroupBackgroundColor $SECONDARY
|
||||||
|
GroupBodyBackgroundColor $BGCOLOR
|
||||||
GroupHeaderBackgroundColor $BGCOLOR
|
GroupHeaderBackgroundColor $BGCOLOR
|
||||||
''
|
''
|
||||||
DividerBackgroundColor $DARK
|
DividerBackgroundColor $DARK
|
||||||
@ -192,7 +227,6 @@ skinparam sequence {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub partition
|
!startsub partition
|
||||||
|
|
||||||
skinparam partition {
|
skinparam partition {
|
||||||
BorderColor $PRIMARY
|
BorderColor $PRIMARY
|
||||||
FontColor $PRIMARY_LIGHT
|
FontColor $PRIMARY_LIGHT
|
||||||
@ -201,35 +235,30 @@ skinparam partition {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub collections
|
!startsub collections
|
||||||
|
|
||||||
skinparam collections {
|
skinparam collections {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub control
|
!startsub control
|
||||||
|
|
||||||
skinparam control {
|
skinparam control {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub entity
|
!startsub entity
|
||||||
|
|
||||||
skinparam entity {
|
skinparam entity {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub boundary
|
!startsub boundary
|
||||||
|
|
||||||
skinparam boundary {
|
skinparam boundary {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub agent
|
!startsub agent
|
||||||
|
|
||||||
skinparam agent {
|
skinparam agent {
|
||||||
BackgroundColor $WARNING
|
BackgroundColor $WARNING
|
||||||
BorderColor $WARNING_LIGHT
|
BorderColor $WARNING_LIGHT
|
||||||
@ -238,33 +267,29 @@ skinparam agent {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub note
|
!startsub note
|
||||||
|
|
||||||
skinparam note {
|
skinparam note {
|
||||||
BorderThickness 1
|
BorderThickness 1
|
||||||
BackgroundColor $INFO
|
BackgroundColor $INFO
|
||||||
BorderColor $INFO_DARK
|
BorderColor $INFO_DARK
|
||||||
FontColor $WHITE
|
FontColor $INFO_TEXT
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub artifact
|
!startsub artifact
|
||||||
|
|
||||||
skinparam artifact {
|
skinparam artifact {
|
||||||
BackgroundColor $DARK
|
BackgroundColor $SECONDARY_LIGHT-$SECONDARY_DARK
|
||||||
BorderColor $DARK_DARK
|
BorderColor $LIGHT
|
||||||
FontColor $LIGHT
|
FontColor $LIGHT
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub component
|
!startsub component
|
||||||
|
|
||||||
skinparam component {
|
skinparam component {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub interface
|
!startsub interface
|
||||||
|
|
||||||
skinparam interface {
|
skinparam interface {
|
||||||
BackgroundColor $DANGER_DARK
|
BackgroundColor $DANGER_DARK
|
||||||
BorderColor $DANGER
|
BorderColor $DANGER
|
||||||
@ -273,16 +298,14 @@ skinparam interface {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub storage
|
!startsub storage
|
||||||
|
|
||||||
skinparam storage {
|
skinparam storage {
|
||||||
BackgroundColor $WARNING
|
BackgroundColor $WARNING_LIGHT-$WARNING_DARK
|
||||||
BorderColor $WARNING_DARK
|
BorderColor $WARNING_DARK
|
||||||
FontColor $WARNING_TEXT
|
FontColor $WARNING_TEXT
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub node
|
!startsub node
|
||||||
|
|
||||||
skinparam node {
|
skinparam node {
|
||||||
BackgroundColor $BGCOLOR
|
BackgroundColor $BGCOLOR
|
||||||
BorderColor $PRIMARY_LIGHT
|
BorderColor $PRIMARY_LIGHT
|
||||||
@ -291,16 +314,14 @@ skinparam node {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub cloud
|
!startsub cloud
|
||||||
|
|
||||||
skinparam cloud {
|
skinparam cloud {
|
||||||
BackgroundColor $DARK-black
|
BackgroundColor transparent
|
||||||
BorderColor $DARK
|
BorderColor $PRIMARY_LIGHT
|
||||||
FontColor $LIGHT
|
FontColor $LIGHT
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub database
|
!startsub database
|
||||||
|
|
||||||
skinparam database {
|
skinparam database {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
BackgroundColor $BGCOLOR
|
BackgroundColor $BGCOLOR
|
||||||
@ -308,10 +329,9 @@ skinparam database {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub class
|
!startsub class
|
||||||
|
|
||||||
skinparam class {
|
skinparam class {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
HeaderBackgroundColor $PRIMARY_LIGHT
|
HeaderBackgroundColor $SECONDARY_DARK-$SECONDARY
|
||||||
StereotypeFontColor $DARK
|
StereotypeFontColor $DARK
|
||||||
BorderThickness 1
|
BorderThickness 1
|
||||||
AttributeFontColor $LIGHT
|
AttributeFontColor $LIGHT
|
||||||
@ -320,7 +340,6 @@ skinparam class {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub object
|
!startsub object
|
||||||
|
|
||||||
skinparam object {
|
skinparam object {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
StereotypeFontColor $DARK
|
StereotypeFontColor $DARK
|
||||||
@ -331,7 +350,6 @@ skinparam object {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub usecase
|
!startsub usecase
|
||||||
|
|
||||||
skinparam usecase {
|
skinparam usecase {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
BorderThickness 2
|
BorderThickness 2
|
||||||
@ -340,7 +358,6 @@ skinparam usecase {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub rectangle
|
!startsub rectangle
|
||||||
|
|
||||||
skinparam rectangle {
|
skinparam rectangle {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
BackgroundColor $BGCOLOR
|
BackgroundColor $BGCOLOR
|
||||||
@ -350,7 +367,6 @@ skinparam rectangle {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub package
|
!startsub package
|
||||||
|
|
||||||
skinparam package {
|
skinparam package {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
BackgroundColor $BGCOLOR
|
BackgroundColor $BGCOLOR
|
||||||
@ -359,7 +375,6 @@ skinparam package {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub folder
|
!startsub folder
|
||||||
|
|
||||||
skinparam folder {
|
skinparam folder {
|
||||||
BackgroundColor $SECONDARY_LIGHT
|
BackgroundColor $SECONDARY_LIGHT
|
||||||
BorderColor $WARNING
|
BorderColor $WARNING
|
||||||
@ -369,7 +384,6 @@ skinparam folder {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub frame
|
!startsub frame
|
||||||
|
|
||||||
skinparam frame {
|
skinparam frame {
|
||||||
BackgroundColor $SECONDARY_LIGHT
|
BackgroundColor $SECONDARY_LIGHT
|
||||||
BorderColor $INFO
|
BorderColor $INFO
|
||||||
@ -379,7 +393,6 @@ skinparam frame {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub state
|
!startsub state
|
||||||
|
|
||||||
skinparam state {
|
skinparam state {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
StartColor $INFO
|
StartColor $INFO
|
||||||
@ -390,39 +403,35 @@ skinparam state {
|
|||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub queue
|
!startsub queue
|
||||||
|
|
||||||
skinparam queue {
|
skinparam queue {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub card
|
!startsub card
|
||||||
|
|
||||||
skinparam card {
|
skinparam card {
|
||||||
BackgroundColor $INFO
|
BackgroundColor $INFO_LIGHT-$INFO_DARK
|
||||||
BorderColor $INFO_DARK
|
BorderColor $INFO_DARK
|
||||||
FontColor $INFO_TEXT
|
FontColor $INFO_TEXT
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub file
|
!startsub file
|
||||||
|
|
||||||
skinparam file {
|
skinparam file {
|
||||||
BackgroundColor $SECONDARY_LIGHT-$SECONDARY
|
BackgroundColor $SECONDARY_LIGHT-$SECONDARY_DARK
|
||||||
BorderColor $INFO
|
BorderColor $INFO
|
||||||
FontColor $SECONDARY_TEXT
|
FontColor $SECONDARY_TEXT
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!startsub stack
|
!startsub stack
|
||||||
|
|
||||||
skinparam stack {
|
skinparam stack {
|
||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
}
|
}
|
||||||
!endsub
|
!endsub
|
||||||
|
|
||||||
!if %variable_exists("NEWSTYLE")
|
!if %variable_exists("NEWSTYLE")
|
||||||
<style>
|
<>
|
||||||
wbsDiagram {
|
wbsDiagram {
|
||||||
LineColor $PRIMARY
|
LineColor $PRIMARY
|
||||||
BorderThickness 3
|
BorderThickness 3
|
||||||
@ -449,5 +458,5 @@ wbsDiagram {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</>
|
||||||
!endif
|
!endif
|
||||||
|
Loading…
Reference in New Issue
Block a user