# Force colour change?

**URL:** <https://forum.kustom.rocks/t/force-colour-change/13312>\
**Category:** Issues\
**Tags:** globals, kwgt, help\
**Created:** [June 24, 2026, 10:24pm UTC](https://forum.kustom.rocks/t/force-colour-change/13312 "2026-06-24T22:24:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Williams](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/williams/32/5500_2.png) [@Williams](https://forum.kustom.rocks/u/Williams)\
**Post date:** [June 24, 2026, 10:24pm UTC](https://forum.kustom.rocks/t/force-colour-change/13312/1 "2026-06-24T22:24:16Z")

</div>

I have a global that changes colour on day change.. at least it should but it won’t actually change colour until I open the widget config briefly.

I’m certainly no coder but I kind of understand why this happens but is there a way to force the change automatically?

My formula looks something like this:

_$if(df(EEE)=mon,_#111111\*,\*  
df(EEE)=tue,_#222222_)$\*\*

Grateful for any suggestions!

---

<div class="post-metadata">

**Author:** ![Baju\_Santiko](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/baju_santiko/32/6471_2.png) [@Baju\_Santiko](https://forum.kustom.rocks/u/Baju_Santiko)\
**Post date:** [June 25, 2026, 4:34am UTC](https://forum.kustom.rocks/t/force-colour-change/13312/2 "2026-06-25T04:34:01Z")

</div>

Hi @Williams ,

Try the following tips:

![Weekday to Color](https://forumcdn.kustom.rocks/original/2X/7/73db19acafd7e77c6e4a269c355a3b28d9890de0.gif)

The formula used to change the color, based on the weekday short name:

`$gv(tc(low,df(EEE)))$`

I hope this would help.

☺👍

---

<div class="post-metadata">

**Author:** ![MaxP](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/maxp/32/5253_2.png) [@MaxP](https://forum.kustom.rocks/u/MaxP)\
**Post date:** [June 25, 2026, 4:50am UTC](https://forum.kustom.rocks/t/force-colour-change/13312/3 "2026-06-25T04:50:52Z")

</div>

Did you set the KWGT app battery to “Unrestricted” in your phone settings?

Using df(EEE) = mon will break the widget if the system language changes. Use day numbers instead—df(e) outputs 1 for Monday, 2 for Tuesday, etc. It works globally on any language.

Your corrected formula should look like this:$if(df(e)=1, #FF111111, df(e)=2, #FF222222, #FF333333)$

---

<div class="post-metadata">

**Author:** ![Williams](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/williams/32/5500_2.png) [@Williams](https://forum.kustom.rocks/u/Williams)\
**Post date:** [June 25, 2026, 10:16pm UTC](https://forum.kustom.rocks/t/force-colour-change/13312/4 "2026-06-25T22:16:34Z")

</div>

@Baju_Santiko thank you I will try this! 🙏🏻

@MaxP I have unrestricted setting on and everything else works and changes as it should (I have other stuff changing with days too). Thanks I hadn’t realised about the English day names! 🤦🏻‍♂️

---

<div class="post-metadata">

**Author:** ![Williams](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/williams/32/5500_2.png) [@Williams](https://forum.kustom.rocks/u/Williams)\
**Post date:** [June 25, 2026, 10:25pm UTC](https://forum.kustom.rocks/t/force-colour-change/13312/5 "2026-06-25T22:25:12Z")

</div>

Ok, another problem I think I’m about to have 😂 that’s somewhat related to this..

I have created a font with “images” containing current weekday and if I use EEE to point to a specific image (letter) it won’t work unless english but if I use day number (e) there’s a problem when week is set to start on Sunday vs Monday right? I hope you understand how i mean..

0=Sat 1=Sun 2=Mon? This is driving me crazy the numbers corresponding to correct weekdays make no sense to me.

EDIT. I’m not sure but I think I got it now.. 🤷🏻‍♂️

[Here’s](https://forum.kustom.rocks/t/just-something-im-working-on/13313) the setup I’m working on and you can see where I use weekdays to change color and “image”.

 ![ezgif-69c10e0466b60695](https://forumcdn.kustom.rocks/original/2X/4/41ef4bd44c86073cdee0e9df958614744f55d0df.jpeg)

---

<div class="post-metadata">

**Author:** ![Baju\_Santiko](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/baju_santiko/32/6471_2.png) [@Baju\_Santiko](https://forum.kustom.rocks/u/Baju_Santiko)\
**Post date:** [June 26, 2026, 12:17am UTC](https://forum.kustom.rocks/t/force-colour-change/13312/6 "2026-06-26T00:17:37Z")

</div>

Hi @Williams ,

You can set your preferred **First day of the week** in the app settings.

 ![Kustom General Settings](https://forumcdn.kustom.rocks/original/2X/3/3cd7f225b43b59a1fa95b43644c851d798064b09.png)

I hope this would help.

☺👍

---

<div class="post-metadata">

**Author:** ![Williams](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/williams/32/5500_2.png) [@Williams](https://forum.kustom.rocks/u/Williams)\
**Post date:** [June 26, 2026, 12:34am UTC](https://forum.kustom.rocks/t/force-colour-change/13312/7 "2026-06-26T00:34:30Z")

</div>

Thanks for the fast reply! 🙏🏻

---

<div class="post-metadata">

**Author:** ![MaxP](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/maxp/32/5253_2.png) [@MaxP](https://forum.kustom.rocks/u/MaxP)\
**Post date:** [June 26, 2026, 4:49am UTC](https://forum.kustom.rocks/t/force-colour-change/13312/8 "2026-06-26T04:49:27Z")

</div>

You can use $df(f) — ISO day of week (number, 1 = Monday).

---

<div class="post-metadata">

**Author:** ![Williams](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/williams/32/5500_2.png) [@Williams](https://forum.kustom.rocks/u/Williams)\
**Post date:** [June 26, 2026, 6:00am UTC](https://forum.kustom.rocks/t/force-colour-change/13312/9 "2026-06-26T06:00:54Z")

</div>

@MaxP awesome thank you!

---

<div class="post-metadata">

**Author:** ![Williams](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/williams/32/5500_2.png) [@Williams](https://forum.kustom.rocks/u/Williams)\
**Post date:** [June 30, 2026, 10:35pm UTC](https://forum.kustom.rocks/t/force-colour-change/13312/10 "2026-06-30T22:35:25Z")

</div>

Sadly I still have the same problem, the color change wont happen at day change.. is it just for me this is not working? Id be grateful for suggestions. Edit. Would it help if I added something else to the formula, like oh I don’t know.. a new day + clock turns 00:00? I just want the color change to happen automatically without having to enter widget config.

$if(df(f)=1,#90D0F0,

df(f)=2,#90F090,

df(f)=3,#F0F090,

df(f)=4,#FFB060,

df(f)=5,#FF8080,

df(f)=6,#FFB0FF,

df(f)=7,#A080D0)$

---

<div class="post-metadata">

**Author:** ![Baju\_Santiko](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/baju_santiko/32/6471_2.png) [@Baju\_Santiko](https://forum.kustom.rocks/u/Baju_Santiko)\
**Post date:** [June 30, 2026, 11:39pm UTC](https://forum.kustom.rocks/t/force-colour-change/13312/11 "2026-06-30T23:39:38Z")

</div>

Hi @Williams :

Here’s the steps you can follow to make the color of an element (I use text as the example) based on the weekday index.

STEP 1

Create 7 global variables (variable type: Color) for each weekday

- Use the number 1…7 as the variable name

- Pick a color for each of these variables as you prefer

Note

- Using 7 global variables as the color for the element is recommended, it is easier for us to change each color anytime we like without having to manually edit the color codes in the formula

STEP 2

Create an element (I use Text element as the example)

- In the PAINT tab of the element, change the Color attribute to Formula

- Enter the following script as the formula for the Color attribute: `$gv(df(f))$`

Voila!

I hope this would help.

☺👍

---

<div class="post-metadata">

**Author:** ![Williams](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/williams/32/5500_2.png) [@Williams](https://forum.kustom.rocks/u/Williams)\
**Post date:** [July 1, 2026, 12:18am UTC](https://forum.kustom.rocks/t/force-colour-change/13312/12 "2026-07-01T00:18:18Z")

</div>

@Baju_Santiko Thank you! 🙏🏻⭐

---

<div class="post-metadata">

**Author:** ![system](https://forum.kustom.rocks/uploads/default/original/1X/7184cbcdd441596e9d743f475f61b661d1a23e35.png) [@system](https://forum.kustom.rocks/u/system)\
**Post date:** [September 19, 2026, 11:52pm UTC](https://forum.kustom.rocks/t/force-colour-change/13312/13 "2026-09-19T23:52:10Z")

</div>

Closed on September 19, 2026, 11:52pm UTC

This topic was automatically closed 25 days after the last reply. New replies are no longer allowed.
