If "events" holds an array of DayPilot.Event objects you need to change the background color like this:
// ...
evt.data.backColor = 'Gray';
// ...
instead of
// ...
evt.backColor = 'Gray';
// ...
Also, when you select an event the Scheduler automatically applies "scheduler_default_selected" CSS class to the event box (for the default theme which is "scheduler_default"). Depending on your scenario, you may simply adjust the CSS to apply a custom background color.
The default CSS looks like this:
.scheduler_default_selected .scheduler_default_event_inner {
background: #ddd;
}
It's necessary to use the full selector (including the *_event_inner part) and also "background" style instead of "background-color" in order to override the default event color.