The Palette Switcher Plugin
allows you to easily select between dark and light modes
Demo
Screenshots
Settings
In the ControlPanel → Settings → WikiLabs → Palette Switcher tab can be used to change the default setting.
- The standard switcher buttons are the same as in the Appearence → Palette tab - Light Palette is currently selected
- Dark Palette can be selected using button 2
- Enable Automatic Dark/Light Mode Detection - on wiki startup
- Show all possible palettes in the palette drop-down
Setup The Startup Actions
Add 3)
By default “Enable Automatic Dark/Light Mode Detection” is disabled, so the manual mode is active
If you want to activate autmatic mode selection, you need a TW startup action.
Detailed Information can be found in the plugin readme which can be opened by the link seen in the screenshot. (5)
-
Once this tiddler is in place, your wiki should change between light and dark mode depending on the users browser or OS setting at startup
-
To adjust dark/light mode dynamically the Palette Watch plugin is needed. This plugin needs a browser restart.
Add 6)
You need to scroll down to Detect Light / Dark Setting on Startup, there is a button which creates the needed tiddler. (7)
title: _/startup/light-dark/detection
caption: {{$:/language/ControlPanel/Palette/Config/Detection/Caption}}
code-body: yes
tags: $:/tags/StartupAction/Browser
<$reveal type="match" stateTitle="$:/config/palette/enable-light-dark-detection" text="yes">
<$let default={{{ [{$:/info/darkmode}match[yes]then[$:/config/palette/default-dark]else[$:/config/palette/default-light]] }}}>
<$action-setfield $tiddler="$:/palette" text={{{ [<default>get[text]] }}}/>
</$let>
</$reveal>
WikiLabs Suite
The WikiLabs Main Page gives an overview about all editions, plugins and themes.
There is an Introduction Video how to make the WikiLabs Plugin Library available in your own wikis, accessible from the ControlPanel → Plugins → Get More Plugins dialogue.
Code
- Links to the code repository can be found at the overview page
- Issues can be posted at: Issues · wikilabs/plugins · GitHub
About Open Source
Most open source software is free of charge and that’s a good thing! But that does not mean, that there are no costs for someone to create, support and maintain it.
So if you use it: Support it!
Have fun!
Mario