Change of colours with expression

Hi,

I created a simple watch face and I want to alternate between blue/green colors of the hour/minute hands when the watch wakes. Is that possible with an expression in the free version of the creator?

If not, I was thinking to alternate the colors based on the actual time, e.g. in even hours = green, in odd hours = blue.
Could someone help me?

Edit: The only way to create this, is to duplicate the elements and play with the opacity.
e.g. green: $#DH#%2==0?100:0$
blue: $#DH#%2==1?100:0$

But instead of duplicating elements, isn’t it allowed to put expressions on the color?

Thanks!

It is not possible to change the color using the expressions. Maybe in the future. So far you are using a single functional solution.

As far as I know and what I have been doing based on what I have learned: Layering is your friend in this case, It can get a little tedious and if you have a lot of layers it can get confusing if you dont label them well.

Create a layer for day and one for night and have them zero opacity during the times they should not show.

Here is an example i’ve used for fade in/out based on hour of the day:
Time Hr Night -5
$#Dk#<5?100:0$
Time Hr Day +5/-20
$#Dk#>=5&&#Dk#<=20?100:0$
Time Hr Night +20
$#Dk#>20?100:0$

Here is an example i’ve used for fade in/out based on sunrise/sunset:
Time Hr Night -5
$#Dk#<#WSUNRISEH24#?100:0$
Time Hr Day +5/-20
$#Dk#>=#WSUNRISEH24#&&#Dk#<=#WSUNSETH24#?100:0$
Time Hr Night +20
$#Dk#>#WSUNSETH24#?100:0$

Each expression in the set is for a different layer!

Hope this helps.

3 Likes

Here is one of my watchfaces that i used this effect on

Inspection Link:

1 Like

green: $#DH#%2==0?100:0$
blue: $#DH#%2==1?100:0$

This expression works fine when I “run” it on the facer creator. But in my watch (Ticwatch E), not.
Any ideas?
Thx

Try copying the code I gave above, I see you have some difference in your equation.

Mainly the (%) instead of an (?)
I also don’t know if you should have two (=) signs in this. I am also learning and someone else may have better info, but I can say the expressions I gave work!

It may be just the way you wrote them but some watches are sensitive to the presence of spaces. If you have not already done so I suggest to remove all spaces in the expressions.

As I said, the exrpession works fine in facer creator web app when I click the “run” button. So, it’s correct.
It just doesn’t work on my watch.
I tried also with “=” instead of “==” and still doesn’t.
Checked also for spaces, there aren’t.

Are you able to post a link to your draft watch? If you do I will have a look and see if I can see a problem.

Note that just because an expression works in Creator does not mean that it will always work on every watch model. One example for instance is that putting ( ) on the outside of conditional statements works in Creator and on my Galaxy watch but does not work on some watches. Whereas, having no brackets around conditional expressions works in creator and on all watches.

Hi @mikeoday,

Here’s my watch


Maybe you can try it to your watch.

I don’t use any brackets, but I understand indeed that the simulator of the creator can differ from any watch.

Thx

Anyone maybe tried my watch face on their watch to see if it works? (I have a Ticwatch E)
Thx!

Sorry I thought I had answered before …

Is your watch still in draft? The sync button is greyed out for me so I can’t load it.

Cheers
Mike

It’s in inspection mode. What else do I have to check so you load it?
Thx

I’m not sure. I can see your face in inspection mode and therefore I can see the expressions but I can’t download it to my watch to check how it runs on my Samsung. Perhaps you need to publish it before others can download it.

Comment I always get from Facer support is that all mathematical operations should be in parenthesis. So $#DH#%2==0?100:0$ should be $(#DH#%2)==0?100:0$ .

2 Likes

Tried it, it didn’t work immediately, but after reloading the face it worked!
Thx

1 Like