<li>
  <%= link_to cookbook, rel: 'cookbook' do %>
    <div class="cookbook">
      <h3 class="cookbook_heading">
        <%= cookbook.name %>
        <small><%= cookbook.latest_cookbook_version.version %></small>
        <span class="cookbook_lastupdated">
          <i class="fa fa-clock-o"></i> Updated <%= cookbook.updated_at.to_s(:long) %>
        </span>
      </h3>
      <div class="cookbook_category_and_stats">
        <i class="fa fa-folder"></i> Applications
        <ul class="cookbook_stats">
          <li>
            <i class="fa fa-download"></i> <%= cookbook.download_count %>
          </li>
          <li>
            <i class="fa fa-users"></i> 2
          </li>
        </ul>
      </div>
      <ul class="cookbook_platforms show-for-medium-up">
        <% cookbook.supported_platforms.each do |platform| %>
          <li class="cookbook_platform_icon has-tip" title="<%= platform.name %> <%= platform.version_constraint %>" data-tooltip data-icon="<%= supported_platform_icon(platform) %>">
            <span><%= platform.name %></span>
          </li>
        <% end %>
      </ul>
    </div>
  <% end %>
</li>

<li>
  <%= link_to cookbook, rel: 'cookbook' do %>
    <div class="cookbook category_<%= cookbook.category.name.parameterize('_') %>">
      <h3 class="cookbook_heading">
        <%= cookbook.name %>
        <small><%= cookbook.latest_cookbook_version.version %></small>
        <span class="cookbook_lastupdated">
          <i class="fa fa-clock-o"></i> Updated <%= cookbook.updated_at.to_s(:long) %>
        </span>
      </h3>
      <div class="cookbook_category_and_stats">
        <i class="fa fa-folder"></i> Applications
        <ul class="cookbook_stats">
          <li>
            <i class="fa fa-download"></i> <%= cookbook.download_count %>
          </li>
          <li>
            <i class="fa fa-users"></i> 2
          </li>
        </ul>
      </div>
      <ul class="cookbook_platforms show-for-medium-up">
        <% cookbook.supported_platforms.each do |platform| %>
          <li class="cookbook_platform_icon has-tip" title="<%= platform.name %> <%= platform.version_constraint %>" data-tooltip data-icon="<%= supported_platform_icon(platform) %>">
            <span><%= platform.name %></span>
          </li>
        <% end %>
      </ul>
    </div>
  <% end %>
</li>

Add category class to the cookbook partial.
Add category class to the cookbook partial.

This colors the cookbook partial based on their category.
