This is not hard at all. Here is a code snippet which I use for my offices which turn different events into different colors (based on the first two letters).
Event: "FG - Out of Office"
protected void DayPilotMonth1_BeforeEventRender(object sender, DayPilot.Web.Ui.Events.Month.BeforeEventRenderEventArgs e)
{
if (e.Text.ToString().IndexOf("OB Call") > 0)
e.BackgroundColor = "#99FFFF";
else
{
string physician = e.Text.ToString().Substring(0, 2); //<-- This grabs the "FG"
//RB physicians
switch (physician)
{
case "CB":
e.BackgroundColor = "#66CC44";
break;
case "KB":
e.BackgroundColor = "#FFAA00";
break;
case "FG":
e.BackgroundColor = "#FFFF33";
break;
case "PJ":
e.BackgroundColor = "#FF4466";
break;
case "BK":
e.BackgroundColor = "#00CC33";
break;
case "ST":
e.BackgroundColor = "#CC44CC";
break;
case "CY":
e.BackgroundColor = "#99FF00";
break;
default:
e.BackgroundColor = "#96FF7D";
break;
}
}
}
Hope that helps!!