Skip to content

Commit bd89b65

Browse files
authored
Merge pull request #313 from kirchsth/feature/303_theme_mweagle
#303 update documentation: <C4/themes>, mweagle themes
2 parents 0fac328 + 1bd28aa commit bd89b65

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

Themes.md

+42-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [C4_superhero](#c4_superhero)
1515
- [C4_united](#c4_united)
1616
- [C4_violet](#c4_violet)
17+
- [Matt Weagle themes](#matt-weagle-themes)
1718
- [Write custom themes](#write-custom-themes)
1819
- [Following variables could be set in a theme, additional to the skinparams and styles](#following-variables-could-be-set-in-a-theme-additional-to-the-skinparams-and-styles)
1920
- [(C4 styled) Sequence diagram and themes](#c4-styled-sequence-diagram-and-themes)
@@ -42,7 +43,18 @@ In order to invoke a local theme `C4_foo`, you have to use the following directi
4243
!theme C4_foo from /path/to/themes/folder
4344
```
4445

45-
(It is planed that included themes can be loaded via `!theme C4_united from <C4/themes>` too, but this requires a PlantUML extension with is missing atm)
46+
Starting with PlantUML v1.2023.8 the C4 themes can be invoked via C4-Stdlib or calculated paths too:
47+
48+
```plantuml
49+
' theme from C4-Stdlib
50+
!theme C4_united from <C4/themes>
51+
52+
' another alternative: theme with calculated from
53+
!RELATIVE_INCLUDE = "https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master"
54+
!theme C4_united from %get_variable_value("RELATIVE_INCLUDE")/themes
55+
```
56+
57+
Following simple sample uses the C4_united theme from the official remote repository path.
4658

4759
```plantuml
4860
@startuml
@@ -141,6 +153,35 @@ Theme [C4_violet](https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/
141153

142154
![](https://www.plantuml.com/plantuml/png/hS_12i8m383X-vvYUu0jbvqyJOQt2HuKZz9jSIiaRMbInRUtzHay9GJ-3pA8cgY9gMfqHyPwx1ylwmcrVaRFzQuQv00GpRlRhEvfJe9nyKxHQRTuXa365Q0LNSdECFRjfPnkvmdOY6A4donLOzr2QSN_e24N7xYYw97eHCYvbNlM9jpGhLqeJmrvo_CB)
143155

156+
## Matt Weagle themes
157+
158+
Matt Weagle published a set of impressive themes based on ColorBrewer and Seaborn palettes (thank you Matt).
159+
160+
https://github.com./mweagle/C4-PlantUML-Themes contains an overview of all his themes.
161+
162+
They can be simply invoked like the `cb_seq_YlOrBr_9` theme
163+
164+
```plantuml
165+
@startuml
166+
!theme cb_seq_YlOrBr_9 from https://raw.githubusercontent.com/mweagle/C4-PlantUML-Themes/main/palettes
167+
168+
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
169+
170+
Person(admin, "Administrator")
171+
System_Boundary(c1, "Sample System") {
172+
Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", "Allows users to compare multiple Twitter timelines")
173+
}
174+
System(twitter, "Twitter")
175+
176+
Rel(admin, web_app, "Uses", "HTTPS")
177+
Rel(web_app, twitter, "Gets tweets from", "HTTPS")
178+
179+
SHOW_FLOATING_LEGEND()
180+
@enduml
181+
```
182+
183+
![Matt theme sample - cb_div_BrBG_11](https://www.plantuml.com/plantuml/png/ZL5DRzD04BtlhzY6YoCrjegumAck2IbIcbZOfUAqMjj3izBi1pjZMHNYlxEhGDjZVHbvtflteRqcrf5dY-A2Js11ZeCY-AL-u37UHFLH_epUoXDpe4zL5VLIFXe-pSDC44Vl61oNexULNK0_8bJDXqsBsl7ztNxJPq6gh3Qk2Xg16KY82-D6d2TuWsX0xNAs3V64PdWjNbbD336jLECT9mk8PSWzH0kHl2lqP8sxbAiwJqCSDVkuMelkAHrQTUDdD-duL8nNYTHf6n3a6LkjvMyXq_UiN2mmA1r2OZx08EiGq8oQZNUhj6hUNSgwQyl3jayd4UJxyahUVMyoLYFwXMHkHfAz7BqDEb7iZ6ooPRyOPeYIZGLCNfGY_laNik0pc7JEj9nVV0FyN-ubrZq1PR_Rlc-xnCgaP_H5PWTCwHVoo2_x-aHqjyS7zML_hFklXvtQRtVRm-TYBQx1JRF5lm00 "Matt theme sample - cb_div_BrBG_11")
184+
144185
## Write custom themes
145186

146187
You can create your own theme on your local file system. You can duplicate any existing theme to create your own one.

0 commit comments

Comments
 (0)