How could we set a gradient using a formula?

Hello, There!! I am searching to define a gradient background using a formula so that the gradient also changes along with the dark or light mode.

You should look into how the gradient is defined in the css, there is also a tooltip on the bottom right when you bind the property, stating the right format. Based on that, construct that string based on the format.

oh, Nice!! Thankyou, @Broberto !!