What event can I use to customize event html element?

Hi, basically I need to set the event element border color based on certain conditions (arbitrary color, so setting class will not be enough). What event should I attach to so that my changes persist when event is re-rendered for any reason, like window resize, modes switches, etc.?
I tried onAfterEventDisplay, it is not working at all, and don’t seem to be called ever.

Scheduler doesn’t provide access to rendered html events, and doesn’t preserve any modifications to the HTML. It is based on assumption that all configuration occurs in templates only.

If templates is not enough ( as in your case ) - you can redefine the event rendering code
docs.dhtmlx.com/scheduler/custom … splay.html