How to change color of the recorded events in the calendar

Hi,
Is it possible to change the color of the appointment created in the calendar by passing a dynamic variable.