Dark, light palettes: How to find which is in use?

39 views
Skip to first unread message

Mohammad

unread,
Dec 6, 2020, 6:00:44 AM12/6/20
to TiddlyWiki
Third party plugins need to distinguish between dark and light palettes to adjust colors and other visual effects of their elements.

In TW 5.1.23, how a plugin can find which mode is in use? Dark or Light? Is there any state or info tiddler?

Jeremy Ruston

unread,
Dec 6, 2020, 6:10:48 AM12/6/20
to TiddlyWiki Group
Hi Mohammad

Third party plugins need to distinguish between dark and light palettes to adjust colors and other visual effects of their elements.

In TW 5.1.23, how a plugin can find which mode is in use? Dark or Light? Is there any state or info tiddler?

Beyond the ability to make dark palettes that we’ve had for a long time, the only support for dark mode in v5.1.23 is that the operating system dark mode setting is reflected in $:/info/darkmode.

We opted not to implement automatic switching of palettes in this release largely because of the backwards compatibility issues that we want to get right.

Best wishes

Jeremy



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9d1da969-9186-4c29-8f84-5589bbbe8b6fn%40googlegroups.com.

Mohammad

unread,
Dec 6, 2020, 6:17:01 AM12/6/20
to TiddlyWiki
Thank you Jeremy,
 So if a user change the palette in Tiddlywiki, say from "Vanilla" to "Gruv Box Dark" there is no way a third party plugin notify about this change! Am I right?
If the above is correct, a plugin needs to have its own setting and dark palette/theme and lets user manually switch the plugin palette/theme to meet the Tiddlywiki palette in use.

--Mohammad

Jeremy Ruston

unread,
Dec 6, 2020, 6:27:42 AM12/6/20
to TiddlyWiki Group
Hi Mohammad

 So if a user change the palette in Tiddlywiki, say from "Vanilla" to "Gruv Box Dark" there is no way a third party plugin notify about this change! Am I right?

The plugin would be able to tell that $:/palette was set to $:/palettes/GruvboxDark, but there would be no way for the plugin to know whether the palette is supposed to be categorised as light or dark.


If the above is correct, a plugin needs to have its own setting and dark palette/theme and lets user manually switch the plugin palette/theme to meet the Tiddlywiki palette in use.

Nothing has changed here; we’ve always had a mix of light and dark palettes, with no special markings to indicate which is which.

If plugins want to play well with different palettes the best technique is to ensure that they exclusively use named colours via the <<colour>> macro; that way everything will change automatically as the palette is changed.

Best wishes

Jeremy.



--Mohammad

On Sunday, December 6, 2020 at 2:40:48 PM UTC+3:30 jeremy...@gmail.com wrote:
Hi Mohammad

Third party plugins need to distinguish between dark and light palettes to adjust colors and other visual effects of their elements.

In TW 5.1.23, how a plugin can find which mode is in use? Dark or Light? Is there any state or info tiddler?

Beyond the ability to make dark palettes that we’ve had for a long time, the only support for dark mode in v5.1.23 is that the operating system dark mode setting is reflected in $:/info/darkmode.

We opted not to implement automatic switching of palettes in this release largely because of the backwards compatibility issues that we want to get right.

Best wishes

Jeremy



-- 
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9d1da969-9186-4c29-8f84-5589bbbe8b6fn%40googlegroups.com.


-- 
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mohammad

unread,
Dec 6, 2020, 6:31:17 AM12/6/20
to TiddlyWiki
Hi Jeremy,
 Thank you for clarification. 

Best wishes
Mohammad

Reply all
Reply to author
Forward
0 new messages