mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-26 06:46:45 +00:00
Merge pull request #1059 from bharatrajagopalan/master
Carbon Gray Theme
This commit is contained in:
commit
a8dd89ac1d
544
themes/puml-theme-carbon-gray.puml
Normal file
544
themes/puml-theme-carbon-gray.puml
Normal file
@ -0,0 +1,544 @@
|
||||
''
|
||||
'' Carbon Gray theme - using the Gray palette from https://carbondesignsystem.com
|
||||
''
|
||||
'' Author: Bharat Rajagopalan
|
||||
'' Copyright (c) 2022 by Bharat Rajagopalan
|
||||
|
||||
!$THEME = "carbon-gray"
|
||||
|
||||
'!$BGCOLOR = "#f5f5f5"
|
||||
|
||||
!if %not(%variable_exists("$BGCOLOR"))
|
||||
!$BGCOLOR = "transparent"
|
||||
!endif
|
||||
|
||||
skinparam backgroundColor $BGCOLOR
|
||||
skinparam useBetaStyle false
|
||||
|
||||
!$GRAY_10 = '#f4f4f4'
|
||||
!$GRAY_20 = '#e0e0e0'
|
||||
!$GRAY_30 = '#c6c6c6'
|
||||
!$GRAY_40 = '#a8a8a8'
|
||||
!$GRAY_50 = '#8d8d8d'
|
||||
!$GRAY_60 = '#6f6f6f'
|
||||
!$GRAY_70 = '#525252'
|
||||
!$GRAY_80 = '#393939'
|
||||
!$GRAY_90 = '#262626'
|
||||
!$GRAY_100 = '#161616'
|
||||
!$WHITE = '#FFFFF'
|
||||
|
||||
!$GRAY_DARK = $GRAY_100
|
||||
!$GRAY = $GRAY_30
|
||||
!$LIGHT = $GRAY_70
|
||||
!$DARK = $GRAY_90
|
||||
|
||||
'' *_LIGHT = tint (lighter) of the main color of 80%
|
||||
'' where TINT is calculated by clr + (255-clr) * tint_factor
|
||||
'' *_DARK = shade (darker) of the main color of 80%
|
||||
'' and SHADE is calculated by clr * (1 - shade_factor)
|
||||
''
|
||||
!$FGCOLOR = $DARK
|
||||
!$PRIMARY = $GRAY_10
|
||||
!$PRIMARY_LIGHT = $GRAY_10
|
||||
!$PRIMARY_DARK = $GRAY_30
|
||||
!$PRIMARY_TEXT = $DARK
|
||||
!$SECONDARY = $GRAY_10
|
||||
!$SECONDARY_LIGHT = $GRAY_10
|
||||
!$SECONDARY_DARK = $GRAY_30
|
||||
!$SECONDARY_TEXT = $DARK
|
||||
!$INFO = $WHITE
|
||||
!$INFO_LIGHT = $GRAY_20
|
||||
!$INFO_DARK = $GRAY_30
|
||||
!$INFO_TEXT = $DARK
|
||||
!$SUCCESS = $DARK
|
||||
!$SUCCESS_LIGHT = $DARK
|
||||
!$SUCCESS_DARK = $DARK
|
||||
!$SUCCESS_TEXT = $WHITE
|
||||
!$WARNING = $WHITE
|
||||
!$WARNING_LIGHT = $WHITE
|
||||
!$WARNING_DARK = $WHITE
|
||||
!$WARNING_TEXT = $DARK
|
||||
!$DANGER = $WHITE
|
||||
!$DANGER_LIGHT = $WHITE
|
||||
!$DANGER_DARK = $WHITE
|
||||
!$DANGER_TEXT = $DARK
|
||||
|
||||
!$OTHER_BG = $WHITE
|
||||
!$DB_BG = $GRAY
|
||||
!$LINE_THICKNESS = 1
|
||||
!$BORDER_THICKNESS = 1
|
||||
|
||||
!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
|
||||
RoundCorner 0
|
||||
!endprocedure
|
||||
|
||||
''
|
||||
'' Global Default Values
|
||||
''
|
||||
skinparam defaultFontName IBM Plex Sans, Noto Sans, Verdana
|
||||
skinparam defaultFontSize 12
|
||||
'skinparam dpi 125
|
||||
skinparam shadowing false
|
||||
skinparam roundcorner 0
|
||||
skinparam ParticipantPadding 30
|
||||
skinparam BoxPadding 30
|
||||
skinparam Padding 10
|
||||
skinparam ArrowColor $GRAY
|
||||
skinparam stereotype {
|
||||
CBackgroundColor $SECONDARY_LIGHT
|
||||
CBorderColor $SECONDARY_DARK
|
||||
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
|
||||
FontSize 20
|
||||
BorderRoundCorner 8
|
||||
BorderThickness 0
|
||||
BackgroundColor $BGCOLOR
|
||||
}
|
||||
|
||||
|
||||
skinparam legend {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $DARK
|
||||
FontColor $PRIMARY_TEXT
|
||||
}
|
||||
|
||||
!startsub swimlane
|
||||
skinparam swimlane {
|
||||
BorderColor $PRIMARY
|
||||
BorderThickness $LINE_THICKNESS
|
||||
TitleBackgroundColor $PRIMARY_LIGHT-$PRIMARY
|
||||
TitleFontColor $PRIMARY_TEXT
|
||||
BackgroundColor $BG_COLOR
|
||||
TitleFontStyle bold
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub activity
|
||||
|
||||
skinparam activity {
|
||||
$primary_scheme()
|
||||
BarColor $DARK
|
||||
StartColor $LIGHT-$DARK
|
||||
EndColor $LIGHT-$DARK
|
||||
''
|
||||
DiamondBackgroundColor $SECONDARY_LIGHT-$SECONDARY
|
||||
DiamondBorderColor $SECONDARY
|
||||
DiamondFontColor $SECONDARY_TEXT
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub participant
|
||||
|
||||
skinparam participant {
|
||||
$primary_scheme()
|
||||
ParticipantBorderThickness $BORDER_THICKNESS
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub actor
|
||||
|
||||
skinparam actor {
|
||||
$primary_scheme()
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub arrow
|
||||
|
||||
skinparam arrow {
|
||||
Thickness $LINE_THICKNESS
|
||||
Color $GRAY
|
||||
FontColor $FGCOLOR
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub sequence
|
||||
|
||||
skinparam sequence {
|
||||
BorderColor $PRIMARY_DARK
|
||||
' For some reason sequence title font color does not pick up from global
|
||||
TitleFontColor $SECONDARY_TEXT
|
||||
BackgroundColor $OTHER_BG
|
||||
StartColor $PRIMARY
|
||||
EndColor $PRIMARY
|
||||
''
|
||||
BoxBackgroundColor $OTHER_BG
|
||||
BoxBorderColor $PRIMARY_DARK
|
||||
BoxFontColor $PRIMARY_TEXT
|
||||
''
|
||||
DelayFontColor $PRIMARY_TEXT
|
||||
''
|
||||
LifeLineBorderColor $PRIMARY_DARK
|
||||
LifeLineBorderThickness $LINE_THICKNESS
|
||||
LifeLineBackgroundColor $PRIMARY
|
||||
''
|
||||
GroupBorderColor $PRIMARY_DARK
|
||||
GroupFontColor $PRIMARY_TEXT
|
||||
GroupFontStyle bold
|
||||
GroupHeaderFontColor $INFO_TEXT
|
||||
GroupBackgroundColor $PRIMARY
|
||||
GroupBodyBackgroundColor $OTHER_BG
|
||||
GroupHeaderBackgroundColor $PRIMARY
|
||||
''
|
||||
DividerBackgroundColor $PRIMARY
|
||||
DividerBorderColor $PRIMARY_DARK
|
||||
DividerBorderThickness $LINE_THICKNESS
|
||||
DividerFontColor $PRIMARY_TEXT
|
||||
''
|
||||
ReferenceBackgroundColor $BGCOLOR
|
||||
ReferenceHeaderBorderColor $PRIMARY_DARK
|
||||
ReferenceHeaderBackgroundColor $PRIMARY
|
||||
ReferenceBorderColor $PRIMARY_DARK
|
||||
ReferenceFontColor $DARK
|
||||
ReferenceHeaderFontColor $INFO_TEXT
|
||||
''
|
||||
StereotypeFontColor $PRIMARY_TEXT
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub partition
|
||||
|
||||
skinparam partition {
|
||||
BorderColor $PRIMARY
|
||||
FontColor $PRIMARY_TEXT
|
||||
BackgroundColor $OTHER_BG
|
||||
fontStyle bold
|
||||
}
|
||||
!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 #orange
|
||||
BorderColor #999999
|
||||
FontColor #333333
|
||||
RoundCorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub note
|
||||
|
||||
skinparam note {
|
||||
BorderThickness 1
|
||||
BackgroundColor $INFO_LIGHT-$INFO
|
||||
BorderColor $DARK
|
||||
FontColor $INFO_TEXT
|
||||
RoundCorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub artifact
|
||||
|
||||
skinparam artifact {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $DARK
|
||||
FontColor $DARK
|
||||
RoundCorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub component
|
||||
|
||||
skinparam component {
|
||||
$primary_scheme()
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $DARK
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub interface
|
||||
|
||||
skinparam interface {
|
||||
BackgroundColor $PRIMARY_DARK
|
||||
BorderColor $PRIMARY_DARK
|
||||
FontColor $PRIMARY_TEXT
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub storage
|
||||
|
||||
skinparam storage {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $DARK
|
||||
FontColor $WARNING_TEXT
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub node
|
||||
|
||||
skinparam node {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $PRIMARY_DARK
|
||||
FontColor $PRIMARY_TEXT
|
||||
Roundcorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub cloud
|
||||
|
||||
skinparam cloud {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $PRIMARY_DARK
|
||||
FontColor $PRIMARY_TEXT
|
||||
Roundcorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub database
|
||||
|
||||
skinparam database {
|
||||
$primary_scheme()
|
||||
BorderColor $PRIMARY_DARK
|
||||
BackgroundColor $OTHER_BG
|
||||
Roundcorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub class
|
||||
|
||||
skinparam class {
|
||||
$primary_scheme()
|
||||
HeaderBackgroundColor $PRIMARY_LIGHT-$PRIMARY
|
||||
StereotypeFontColor $DARK
|
||||
StereotypeFontSize 9
|
||||
BorderThickness $LINE_THICKNESS
|
||||
AttributeFontColor $DARK
|
||||
AttributeFontSize 11
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub object
|
||||
|
||||
skinparam object {
|
||||
$primary_scheme()
|
||||
StereotypeFontColor $PRIMARY_TEXT
|
||||
BorderThickness $BORDER_THICKNESS
|
||||
AttributeFontColor $PRIMARY_TEXT
|
||||
AttributeFontSize 11
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub usecase
|
||||
|
||||
skinparam usecase {
|
||||
$primary_scheme()
|
||||
BorderThickness $BORDER_THICKNESS
|
||||
StereotypeFontColor $PRIMARY_TEXT
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub rectangle
|
||||
|
||||
skinparam rectangle {
|
||||
$primary_scheme()
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderThickness $BORDER_THICKNESS
|
||||
StereotypeFontColor $PRIMARY_TEXT
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub package
|
||||
|
||||
skinparam package {
|
||||
$primary_scheme()
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderThickness $BORDER_THICKNESS
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub folder
|
||||
|
||||
skinparam folder {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $PRIMARY_DARK
|
||||
FontColor $WARNING_TEXT
|
||||
BorderThickness $BORDER_THICKNESS
|
||||
Roundcorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub frame
|
||||
|
||||
skinparam frame {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $PRIMARY_DARK
|
||||
FontColor $DARK
|
||||
BorderThickness $BORDER_THICKNESS
|
||||
Roundcorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub state
|
||||
|
||||
skinparam state {
|
||||
$primary_scheme()
|
||||
BorderColor $PRIMARY_DARK
|
||||
StartColor $INFO
|
||||
EndColor $INFO
|
||||
AttributeFontColor $SECONDARY_TEXT
|
||||
AttributeFontSize 11
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub queue
|
||||
|
||||
skinparam queue {
|
||||
$primary_scheme()
|
||||
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub card
|
||||
|
||||
skinparam card {
|
||||
BackgroundColor $OTHER_BG
|
||||
BorderColor $DARK
|
||||
FontColor $INFO_TEXT
|
||||
RoundCorner 0
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub file
|
||||
|
||||
skinparam file {
|
||||
BackgroundColor $SECONDARY_LIGHT-$SECONDARY
|
||||
BorderColor $SECONDARY_DARK
|
||||
FontColor $SECONDARY_TEXT
|
||||
RoundCorner 0
|
||||
|
||||
}
|
||||
!endsub
|
||||
|
||||
!startsub stack
|
||||
|
||||
skinparam stack {
|
||||
$primary_scheme()
|
||||
}
|
||||
!endsub
|
||||
|
||||
!if (%variable_exists("LEGACY"))
|
||||
!$LEGACY = "true"
|
||||
!endif
|
||||
|
||||
!if (%getenv("LEGACY") == "true")
|
||||
!$LEGACY = "true"
|
||||
!endif
|
||||
|
||||
'!if (not %variable_exists("$LEGACY"))
|
||||
|
||||
skinparam useBetaStyle true
|
||||
|
||||
!startsub mindmap
|
||||
|
||||
<style>
|
||||
|
||||
mindmapDiagram {
|
||||
'Padding 8
|
||||
'Margin 8
|
||||
LineThickness $LINE_THICKNESS
|
||||
FontColor $PRIMARY_TEXT
|
||||
LineColor $PRIMARY_DARK
|
||||
'BackgroundColor $PRIMARY_LIGHT-$PRIMARY
|
||||
Roundcorner 0
|
||||
node {
|
||||
'Padding 12
|
||||
'Margin 3
|
||||
'HorizontalAlignment center
|
||||
LineColor $PRIMARY_DARK
|
||||
LineThickness $BORDER_THICKNESS
|
||||
BackgroundColor $PRIMARY_LIGHT-$PRIMARY
|
||||
RoundCorner 0
|
||||
MaximumWidth 100
|
||||
FontColor $DARK
|
||||
'FontStyle bold
|
||||
}
|
||||
}
|
||||
|
||||
wbsDiagram {
|
||||
'Padding 8
|
||||
node {
|
||||
'Padding 12
|
||||
'Margin 3
|
||||
'HorizontalAlignment center
|
||||
LineColor $PRIMARY_DARK
|
||||
LineThickness $BORDER_THICKNESS
|
||||
BackgroundColor $PRIMARY_LIGHT-$PRIMARY
|
||||
RoundCorner 0
|
||||
MaximumWidth 100
|
||||
FontColor $PRIMARY_TEXT
|
||||
'FontStyle bold
|
||||
}
|
||||
'Margin 8
|
||||
'LineThickness $LINE_THICKNESS
|
||||
'FontColor $PRIMARY_TEXT
|
||||
'LineColor $PRIMARY
|
||||
'BorderColor $PRIMARY
|
||||
'BackgroundColor $PRIMARY_LIGHT-$PRIMARY
|
||||
'RoundCorner 0
|
||||
|
||||
arrow {
|
||||
' note that Connectors are actually "Arrows"; this may change in the future
|
||||
' so this means all Connectors and Arrows are now going to be green
|
||||
|
||||
lineColor $PRIMARY_DARK
|
||||
fontColor $PRIMARY_TEXT
|
||||
thickness $LINE_THICKNESS
|
||||
}
|
||||
|
||||
noteBorderColor $DARK
|
||||
}
|
||||
</style>
|
||||
!endsub
|
||||
'!endif
|
Loading…
Reference in New Issue
Block a user