SharePoint Calendar Color Coding for Non-Power Users

Adding different color for events is the one of the most common requests. It can be hard to find a required event quickly, when all of the events are in same color.

SharePoint Calendar Color Coding Using SharePoint Calendar Overlay

The simplest solution to color-code events on SharePoint calendar is using SharePoint calendar overlay.

Go to the List settings on your calendar and create a column with Choice type.

Enter the choice types for the SharePoint calendar. In our case, they are Meetings, Work hours, and Birthday.

Save the changes. Before add colors to your events, create a new “Calendar view”.

Enter a view name. This will be the one of the choices you have entered for events.

Adjust a filter for the required event type.

Save the view. Perform the same operation with other event types and create 2 more views.

Next step is to add SharePoint calendar overlay. Click SharePoint calendar overlay icon on the ribbon and create a new calendar.

Type the calendar name and choose a color for the SharePoint calendar.

Type the calendar name and choose a color for the SharePoint calendar.

How to Resolve Duplicate Events

Ensure that the duplicate events are missing in overlapped calendars like on the screen below.

To perform this, click Modify view and clear filter field in the default calendar or in any other calendar, which is used for SharePoint calendar color coding.

Once the duplicate items are removed, we will have all events in different colors using SharePoint calendar overlay feature.


SharePoint calendar color coding using script

Another method to add different colors to SharePoint calendar is by writing code.

First step is to create a new category column in SharePoint calendar for event categories. In our example, it is called “Event type”.

Next, create another column, and select “calculated” type and add the formula “|||” & [Event type] & “|||” & [Title].
You can also type any other column name instead of “Event type”.

Create a new view or modify the default view of the SharePoint calendar and change the month, week, and day view’s fields to the name of created column.

Now, include the following script into the content editor. Choose “Click here to add new content”, then “Edit Source”, paste the script and click “Save“.

 <script src=”” type=”text/javascript”></script>
 <script type=”text/javascript”>
 var shouldcolortext = true;
LoadSodByKey(“SP.UI.ApplicationPages.Calendar.js”, function () {
    window.setTimeout(ColorCodeCalendar, 1000);
var sep = “|||”;
function ColorCodeCalendar() {
    var bodyContainer = jQuery(‘#s4-bodyContainer’);
    var q = ‘a:contains(‘ + sep + ‘)’;
    if (bodyContainer.find(q).length > 0) {
        bodyContainer.find(q).each(function (i) {
            var div = jQuery(this).parents(‘div[title]’);
            var colors = GetColorCodeFromCategory(GetCategory(this.innerHTML));
            var anchor = jQuery(this);
            div.attr(“title”, GetText(box.attr(“title”)));
            div.css(‘background-color’, colors[0]);
            div.css(‘display’, ‘block’);
            if (shouldcolortext) {
                div.find(‘div, a’).css(“cssText”, “color: ” + colors[1] + ” !important;”);
    window.setTimeout(ColorCodeCalendar, 2000);
function GetText(originalText) {
    var parts = originalText.split(SEPARATOR);
    return parts[0] + parts[2];
function GetCategory(originalText) {
    var parts = originalText.split(SEPARATOR);
    return parts[1];
function GetColorCodeFromCategory(category) {
    var bg = null;
    var fg = null;
    switch (category.trim()) {
        case ‘Meetings’:
            bg = ‘#ECD078’;
            fg = ‘#000000’;
        case ‘Work hours’:
            bg = ‘#D95B43’;
            fg = ‘#000000’;
        case ‘Birthday’:
            bg = ‘#C02942’;
            fg = ‘#000000’;
    return [bg, fg];

You can also add some more different colors to SharePoint calendar. Now, you can display your events on a site page with SharePoint calendar color coding.

Virto Calendar – a Third-Party Solution for SharePoint Calendar Color Coding

Another simple way to color code events in SharePoint calendar without coding and time consuming adjustments is by using ready-to-use web parts and add-ins.
Virto Calendar for SharePoint Online, SharePoint 2016, 2013, 2010, and 2007 is a powerful enterprise-class scheduling solution, that overlays all your events from cross-site collection calendars and from any SharePoint or Exchange Online (Outlook) calendars.

With Virto SharePoint calendar, you can customize SharePoint calendar color for each data source with a few clicks!

Another awesome feature is the ability to choose a color marker according to event type.

A color marker is present on the left side of events and corresponds to a data source color.

Also, you can perform the SharePoint calendar overlay with a single click and display any number of SharePoint and shared Exchange Online Calendars into one calendar. Virto SharePoint calendar color coding makes it easier for users to see items on a calendar!
You can download the 30-days free trial of Virto SharePoint calendar and try all its awesome features!

Virto SharePoint Online calendar 

SharePoint calendar for SharePoint 2016, 2013, 2010, 2007.

Related Products:
Office 365 Calendar SharePoint Calendar