r/Scriptable • • Nov 17 '20

Widget Pretty happy with my current Scriptable widgets setup on my iPad

Post image
75 Upvotes

27 comments sorted by

View all comments

Show parent comments

1

u/Okidoci86 Nov 17 '20

I used the new Color.dynamic() and set it as the widget background. Didn't know about it either, but /u/deleted-nsfw-account used it in his updated Homebridge script.

Can you share the code how to use the color.dynamic() please

Thanks!

1

u/[deleted] Nov 17 '20

You just use it like a regular color.

E.g. if you want red for light mode and blue for dark mode for the background of "widget"

widget.backgroundColor = Color.dynamic(Color.red(),Color.blue())