From 1e0fc0498066317eeae1eb3c3b2531e8c7b26963 Mon Sep 17 00:00:00 2001 From: Anders Norman Date: Thu, 8 Oct 2020 22:01:42 +0200 Subject: [PATCH] Added color override option --- C4_Component.puml | 20 +++++++++----- C4_Container.puml | 20 +++++++++----- C4_Context.puml | 68 ++++++++++++++++++++++++++++++++++------------- 3 files changed, 78 insertions(+), 30 deletions(-) diff --git a/C4_Component.puml b/C4_Component.puml index 40a8a24..1b1c6a3 100644 --- a/C4_Component.puml +++ b/C4_Component.puml @@ -10,23 +10,31 @@ ' Colors ' ################################## +!ifndef COMPONENT_FONT_COLOR +!define COMPONENT_FONT_COLOR ELEMENT_FONT_COLOR +!endif +!ifndef COMPONENT_BG_COLOR !define COMPONENT_BG_COLOR #85BBF0 +!endif +!ifndef COMPONENT_BORDER_COLOR +!define COMPONENT_BORDER_COLOR #78A8D8 +!endif ' Styling ' ################################## skinparam rectangle<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor #000000 + StereotypeFontColor COMPONENT_FONT_COLOR + FontColor COMPONENT_FONT_COLOR BackgroundColor COMPONENT_BG_COLOR - BorderColor #78A8D8 + BorderColor COMPONENT_BORDER_COLOR } skinparam database<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor #000000 + StereotypeFontColor COMPONENT_FONT_COLOR + FontColor COMPONENT_FONT_COLOR BackgroundColor COMPONENT_BG_COLOR - BorderColor #78A8D8 + BorderColor COMPONENT_BORDER_COLOR } ' Layout diff --git a/C4_Container.puml b/C4_Container.puml index 2bc697c..120ff1c 100644 --- a/C4_Container.puml +++ b/C4_Container.puml @@ -10,23 +10,31 @@ ' Colors ' ################################## +!ifndef CONTAINER_FONT_COLOR +!define CONTAINER_FONT_COLOR ELEMENT_FONT_COLOR +!endif +!ifndef CONTAINER_BG_COLOR !define CONTAINER_BG_COLOR #438DD5 +!endif +!ifndef CONTAINER_BORDER_COLOR +!define CONTAINER_BORDER_COLOR #3C7FC0 +!endif ' Styling ' ################################## skinparam rectangle<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor CONTAINER_FONT_COLOR + FontColor CONTAINER_FONT_COLOR BackgroundColor CONTAINER_BG_COLOR - BorderColor #3C7FC0 + BorderColor CONTAINER_BORDER_COLOR } skinparam database<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor CONTAINER_FONT_COLOR + FontColor CONTAINER_FONT_COLOR BackgroundColor CONTAINER_BG_COLOR - BorderColor #3C7FC0 + BorderColor CONTAINER_BORDER_COLOR } ' Layout diff --git a/C4_Context.puml b/C4_Context.puml index a28a9cb..c72fc41 100644 --- a/C4_Context.puml +++ b/C4_Context.puml @@ -10,54 +10,86 @@ ' Colors ' ################################## +!ifndef PERSON_FONT_COLOR +!define PERSON_FONT_COLOR ELEMENT_FONT_COLOR +!endif +!ifndef PERSON_BG_COLOR !define PERSON_BG_COLOR #08427B +!endif +!ifndef PERSON_BORDER_COLOR +!define PERSON_BORDER_COLOR #073B6F +!endif +!ifndef EXTERNAL_PERSON_FONT_COLOR +!define EXTERNAL_PERSON_FONT_COLOR ELEMENT_FONT_COLOR +!endif +!ifndef EXTERNAL_PERSON_BG_COLOR !define EXTERNAL_PERSON_BG_COLOR #686868 +!endif +!ifndef EXTERNAL_PERSON_BORDER_COLOR +!define EXTERNAL_PERSON_BORDER_COLOR #8A8A8A +!endif +!ifndef SYSTEM_FONT_COLOR +!define SYSTEM_FONT_COLOR ELEMENT_FONT_COLOR +!endif +!ifndef SYSTEM_BG_COLOR !define SYSTEM_BG_COLOR #1168BD +!endif +!ifndef SYSTEM_BORDER_COLOR +!define SYSTEM_BORDER_COLOR #3C7FC0 +!endif +!ifndef EXTERNAL_SYSTEM_FONT_COLOR +!define EXTERNAL_SYSTEM_FONT_COLOR ELEMENT_FONT_COLOR +!endif +!ifndef EXTERNAL_SYSTEM_BG_COLOR !define EXTERNAL_SYSTEM_BG_COLOR #999999 +!endif +!ifndef EXTERNAL_SYSTEM_BORDER_COLOR +!define EXTERNAL_SYSTEM_BORDER_COLOR #8A8A8A +!endif ' Styling ' ################################## skinparam rectangle<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor PERSON_FONT_COLOR + FontColor PERSON_FONT_COLOR BackgroundColor PERSON_BG_COLOR - BorderColor #073B6F + BorderColor PERSON_BORDER_COLOR } skinparam rectangle<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor EXTERNAL_PERSON_FONT_COLOR + FontColor EXTERNAL_PERSON_FONT_COLOR BackgroundColor EXTERNAL_PERSON_BG_COLOR - BorderColor #8A8A8A + BorderColor EXTERNAL_PERSON_BORDER_COLOR } skinparam rectangle<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor SYSTEM_FONT_COLOR + FontColor SYSTEM_FONT_COLOR BackgroundColor SYSTEM_BG_COLOR - BorderColor #3C7FC0 + BorderColor SYSTEM_BORDER_COLOR } skinparam rectangle<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor EXTERNAL_SYSTEM_FONT_COLOR + FontColor EXTERNAL_SYSTEM_FONT_COLOR BackgroundColor EXTERNAL_SYSTEM_BG_COLOR - BorderColor #8A8A8A + BorderColor EXTERNAL_SYSTEM_BORDER_COLOR } skinparam database<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor SYSTEM_FONT_COLOR + FontColor SYSTEM_FONT_COLOR BackgroundColor SYSTEM_BG_COLOR - BorderColor #3C7FC0 + BorderColor SYSTEM_BORDER_COLOR } skinparam database<> { - StereotypeFontColor ELEMENT_FONT_COLOR - FontColor ELEMENT_FONT_COLOR + StereotypeFontColor EXTERNAL_SYSTEM_FONT_COLOR + FontColor EXTERNAL_SYSTEM_FONT_COLOR BackgroundColor EXTERNAL_SYSTEM_BG_COLOR - BorderColor #8A8A8A + BorderColor EXTERNAL_SYSTEM_BORDER_COLOR } ' Layout