title: Changing background-color of event in jquery full calendar
body: <p>I have a web application ( asp.net mvc4 ) in which i used the <code>Jquery Full Calendar</code> <a href="http://arshaw.com/fullcalendar/" rel="nofollow noreferrer">site</a> .</p>
  <pre><code>  &lt;script&gt;
  
          $(document).ready(function () {
              var date = new Date();
              var d = date.getDate();
              var m = date.getMonth();
              var y = date.getFullYear();
              var tab = [];
              var d1 = [];
              var m1 = [];
              var y1 = [];
              var d2 = [];
              var m2 = [];
              var y2 = [];
              var colors = [];
              
               @for(int i =0; i&lt; @Model.Get_List_Tache().Count;i++){
                   @: d1.push(@Model.Get_List_Tache()[i].Begin_date.Day);
                   @: m1.push(@Model.Get_List_Tache()[i].Begin_date.Month);
                   @: y1.push(@Model.Get_List_Tache()[i].Begin_date.Year);
                   @: d2.push(@Model.Get_List_Tache()[i].End_date.Day);
                   @: m2.push(@Model.Get_List_Tache()[i].End_date.Month);
                   @: y2.push(@Model.Get_List_Tache()[i].End_date.Year);
                           }
              d1.reverse();
              m1.reverse();
              y1.reverse();
              d2.reverse();
              m2.reverse();
              y2.reverse();
              @for(int i =0; i&lt; @Model.Get_List_Tache().Count;i++){
              @:var e = { title: &quot;Tache: @Model.Get_List_Tache()[i].Tache_description&quot;, start: new Date(y1.pop(), m1.pop() - 1, d1.pop(), 08, 00), end: new Date(y2.pop(), m2.pop() - 1, d2.pop(), 18, 00), allDay: true};
              @: tab.push(e);
          }                      
        $('#calendar').fullCalendar({
                  theme: true,
                  header: {left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'},
                  editable: true,
                  events: tab
        });
          });
           @for (int i = 0; i &lt; @Model.GetColors().Count; i++)
           {
             
           }
  
  &lt;/script&gt;
  </code></pre>
  <p>I have a list of colors in the model <code>GetColors()</code></p>
  <pre><code>public List&lt;string&gt; GetColors() {
              Sa_group sadmin = new Sa_group();
              Equipe _equipe = new Equipe();
              List&lt;string&gt; _out = new List&lt;string&gt;();
              List&lt;Tache&gt; liste_initiale = _equipe.Get_List_tache();
              foreach (Tache t in liste_initiale) {
                  if (t.Id_tache_status == 1) { _out.Add(&quot;red&quot;); }
                  if (t.Id_tache_status == 2) { _out.Add(&quot;green&quot;); }
                  if (t.Id_tache_status == 3) { _out.Add(&quot;black&quot;); }
                                                  }
              return _out;
          }
  </code></pre>
  <p>So, i need to change the <code>background-color</code> for each element in <code>events</code> by the values of <code>GetColors()</code>.</p>
  <p>How can i do this task? Any suggestions?</p>