Code for Transparency Sunrise/Sunset

Thank for your comment! :smile:

So I inspected the top link and bizarrely, I used this one line of code for all four elements in question:

$(#DISDAYTIME#)==0?0:100$

It seemed to work on the creator, however it wouldnā€™t be the first time it worked on the creator and not the device. give it a try and tell me how it goesā€¦

Another option would be to keep the sunrise time at 100% always and just have the sunset popup over the top to cover it.

WAIT NO!!! LIES, ALL LIES!

I had the 100 and 0 in the wrong place for the daytime. This is what it should be for your sunset time:
Transparent during day

$(#DISDAYTIME#)>0?100:0$

@tara.goisisi, Brilliant!!! agree re having the sunrise 100% that was always my intention, your solution works perfectly, thank you so much. Your code is also super useful for another face Iā€™m working on based on the lighting in a submarine that changes colour at dusk so the crew know itā€™s nighttime, thanks again, keep facing

@tara.goisisi, oh does not work for submarine idea, needs to kick in at (100%) sunset and (0%) at sunrise please can you help with that one - would be good if daytime colour could be 0% at night too or thereā€™s a tiny glow around the letters

@tara.goisisi solved with your: $(#DH#)<(#WSH#)&&(#DH#)>(#WRH#)?0:100$
thanks

Hello @hayden @tara.goisisi and @Mellin - I am late here, however I prepared a small tutorial to this topic in the past hour(s). Even if you already solved this particular problem, there are some additional information (e.g. rotation), you could be maybe interesting in :wink: anyway thanks for inspiration :+1:

Hi @Tomas, @Mellin, @tara.goisisi: looking forward to seeing the tutorial, thank you. Iā€™ve used @tara.goisisi solution on the following two faces:


Wishing all community members a Happy Festive Season!

Awesome! love them. Glad to be of assistance! Have a good Christmas all!

Love the watch design. Say another one. Will have to look at more of your stuff.

Iā€™m breaking my brain thinking about the formula for this. Does the creator give you a ā€œsunriseā€ for the next day ever? For instance, after sunrise for current day is done (or even sunset for that matter) will there be a new sunrise value? When does this number reset?

I am working on a countdown timer to sunrise and sunset.
There is a math challenge when the countdown is less than 1 hr.
So I want to hide the number the hour number when the sunset or sunrise is less than 1 hour away.
Would you share your fade in and fade out effect equation, as I think this might key me into a solution.
Thanks!

Have these codes stopped working ?

I have 2 images in the same place. One for Daylight one for Night. I used the $(#DISDAYTIME#),$ codes for each pic, Yet in the editor it doesnā€™t do anything.

Or am I missing something :slight_smile:

Hi @borgcymru, These codes are still working try these in the Opacity Field:

Day:

$#DISDAYTIME#=true?100:0$

Night:

$#DISDAYTIME#=false?100:0$

Enjoy!

2 Likes