Is there a possibility to change the color of an event which is actually taking place?
F. E. : it is 15h and I have an event from 14h-15h. Is it possible to show the specific event in red text color? The rest in standard color...
Hope my question is understandable?
Yes, you can do that, so, let's assume you already have a color option with a formula, so something like $ci(color, 0)$ to select the color of the next event using CI function, then, if i understood you correctly you want to do something if the even is currently taking place, so, $ci(start, 0)$ is when the event starts, $ci(end, 0)$ is when it ends and $df(S)$ is current time in seconds since epoch, so writing this:
$if(df(S) > ci(start, 0) && df(S) < ci(end, 0), #FF0000, ci(color, 0))$
Will return the RED color if the next event is currently taking place or its normal color if not.
Hope it helps.
Thats the original formula:
$tc(up, df(EEEE, ci(start, 0)))$ | $if(ci(allday, 0)=1, Ganztägig, df(hh:mm a, ci(start, 0)) - df(hh:mm a, ci(end,0)))$
Do I have to put the if-statement around the whole formula?
Not sure what exactly you want to do here
This shows me the first event (at the moment an allday event) and formats the day in capital letters. the same formula for the second event shows a start and end time.
In a second line I do have the event itself:
$tc(ell, ci(title, 0), 32)$ - $ci(loc, 0)$
But 1 thing came just in my mind: I do have in the globals set, that if LightUI the text is dark and when DarkUI the text is light. This changes automatically after 22h and 8h in the morning. So I can't set an active event to another color.
Tried again. This is my formula:
Zeit: $df(hh:mm, ci(start, e0))$-$df(hh:mm, ci(end, e0))$ / Ort: $ci(loc, e0)$ $if(df(S) > ci(start, e0) && df(S) < ci(end, e0), #FF0000, ci(color, 0))$
But color is still not red if an event is currently taking place. Do I have to conclude the if-formular-part?
Thanks again for help :-)
$if(df(S) > ci(start, e0) && df(S) < ci(end, e0), #FF0000, ci(color, 0))$
Just outputs the color, you need to use it in the color preference of the module or between bb code tags like [c=$if(df(S) > ci(start, e0) && df(S) < ci(end, e0), #FF0000, ci(color, 0))$]MyText[/c]
At the end of the formula
the "0" can be changed to another color like #FF8E9092?
The "0" gives me just black color back.