Tiddlywiki’s built-in info
module can display the browser’s dark mode settings. So by judging the content of the $:/info/darkmode
tiddler, you can change the palette automatically at startup.
Create the following tiddler tagged $:/tags/StartupAction
can change tiddlywiki’s palette to Solarized dark at startup when browser’s dark mode is enabled. When dark mode is not enabled, it changes the palette to Solarized Light.
<$reveal type="nomatch" state="$:/info/darkmode" text="yes">
<$action-setfield $tiddler="$:/palette" $value="$:/palettes/SolarizedLight"/>
</$reveal>
<$reveal type="match" state="$:/info/darkmode" text="yes">
<$action-setfield $tiddler="$:/palette" $value="$:/palettes/SolarizedDark"/>
</$reveal>