Closed xianqugithub closed 4 months ago
I think I have seen this with older versions of PlantUML. Can you add Title %version()
to your file and share the output?
@startuml
Title %version()
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v17.0/dist
!include AWSPuml/AWSCommon.puml
!include AWSPuml/General/SAMLtoken.puml
!include AWSPuml/Compute/Lambda.puml
!include AWSPuml/Analytics/OpenSearchService.puml
!include AWSPuml/Analytics/OpenSearchServiceOpenSearchDashboards.puml
Lambda(ingestionLambda, "Ingestion Lambda", "ingest data")
@enduml
Title %version()
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v17.0/dist
!include AWSPuml/AWSCommon.puml
!include AWSPuml/General/SAMLtoken.puml
!include AWSPuml/Compute/Lambda.puml
!include AWSPuml/Analytics/OpenSearchService.puml
!include AWSPuml/Analytics/OpenSearchServiceOpenSearchDashboards.puml
Lambda(ingestionLambda, "Ingestion Lambda", "ingest data")
1.2021.12 is about 2 years old and must not like the Dark Mode support detection logic (included in AWSCommon.puml
using the code below). Is this something you can get upgraded?
Can you try and set !$AWS_DARK = false
before you !include AWSPuml/AWSCommon.puml
and see if that works. Any chance $PUML_MODE
being set as plantuml.jar arg?
' Dark Mode support
' ##################################
' if $AWS_DARK is not defined, check $PUML_MODE
!if (%not(%variable_exists("$AWS_DARK")) && (%variable_exists("$PUML_MODE") && $PUML_MODE == "dark"))
!$AWS_DARK = true
!endif
' ensure $AWS_DARK is either true or false
!if %not(%variable_exists("$AWS_DARK") && ($AWS_DARK == true))
!$AWS_DARK = false
!endif
Yes. It's the plantuml.jar
file that I used out of date. After changing the jar file, the image is no longer dark theme.
Was hit with the same issue - out of nowhere all diagrams have black / dark background. Reverted to v15. Specifying these (before include AWSPuml/AWSCommon) didn't help:
!$AWS_DARK = false
!$PUML_MODE = "light"
I think Dark Mode detection logic should be flipped to have bias towards transparent (white) background (maintain compatibility with previous versions).
The logic is supposed to default to light mode - this is the code inside AWSCommon.puml
that would set $AWS_DARK = true
' if $AWS_DARK is not defined, check $PUML_MODE
!if (%not(%variable_exists("$AWS_DARK")) && (%variable_exists("$PUML_MODE") && $PUML_MODE == "dark"))
!$AWS_DARK = true
!endif
I tested with 1.2022.5 and see the same default as dark behavior. I testing the "nested if" logic below and now it works as expect on the older version. Must have been a bug with &&
!if (%not(%variable_exists("$AWS_DARK")))
!if ((%variable_exists("$PUML_MODE") && $PUML_MODE == "dark"))
!$AWS_DARK = true
!endif
!endif
Can you do a local test of the new logic (maybe edit AWSCommon.puml
or import a local version) and see if works for you?
fixed with release 18.0
Tested v18 - all seems good (light mode as expected)
!$AWS_DARK = false & !$PUML_MODE = "light"
Thank you for a quick update 😲 👍
I am using the following code to generate plantuml
And the resulting image is in dark background. Tried tuning the parameters, but have no luck.