Dark mode change

on systemAppearanceChanged pMode, pWindowColor
   set the backgroundColor of this stack to pWindowColor
end systemAppearanceChanged

You’ll notice a second parameter to the systemAppearanceChanged message. This holds the colour value of the window depending on what mode it is being changed to. This allows you to use the right colour in dark mode (it’s not black) and in light mode (it’s not white). Hope you’ll find this change handy - it’ll be available in 0.9.6

1 Like

Could I suggest considering the MIT-licensed tinyColor library ( GitHub - DTByte-Ltd/TinyColor: LiveCode Script library for small and fast color manipulation and conversion. · GitHub ) for color manipulations (such as getting complimentary colours, detecting if dark vs light background for what you’re doing here.

It’s pure livecodescript and works well…
Or is the correct term HyperXTalkScript :wink:

1 Like

Thanks for the pointer. I’ll take a gander once I get HyperXTalk working again :wink:

Incase you want to use the system window colours, here they are:

Dark mode: #323232
Light mode: #ececec

I keep trying to add a function to return the system window colours, incase they change in a future OS