SharePoint 2010 Calendar Colour Coding Solution: WSP Included

A little while back I had to create a solution to colour code a 2010 calendar to be used for internal scheduling here at bluesource… so I thought I’d share it with you chaps..!

The idea behind it is that a list can be used to manage unique keys against colour values. For instance, say a single calendar is used to book all projects. Each project has a unique number, and you wanted those to be automatically colour-coded (without having to use calendar overlays). This solution allows you to specify a key against a colour value – eg ‘Whichever calendar entry has [1234AABB] in the title of the entry, I want to be blue (#000066)’ .


Download the WSP Here:

Please Note: bluesource does not accept any liability for this solution, it is the work of myself only – and as any custom solution, should be installed on development systems first.

It comprises of 2 pieces:

  • A list definition – A list will need to be created from the definition. Unique keys and colour values are entered into the list (in the same site collection as the calendar).
  • A web part – which will need to be added to the calendar page (this injects some javascript goo to do the colour coding). This needs to be pointed at the list (in the web part settings).



  • Deploy the WSP, and activate the Bluesource.Intranet.CalendarColours feature in Site Collection Features.


  • Create a new list from the ‘CalendarColours’ list definition.
  • Enter your values in the list (shown below):
    • Title: The unique key to look for the calendar title
    • Background Hex Value: Hex colour value to make item background
    • Text Hex Value: Hex colour value for text



  • Add the Calendar Colour Coding web part to the calendar page:



  • Enter your calendar entries, using the unique keys – and voila:



Hope this helps – if people want the source code leave me a comment…



12 thoughts on “SharePoint 2010 Calendar Colour Coding Solution: WSP Included

  1. I would love the source code if you are willing to share it. This is a nice feature. It might also give me an insight to a few other things a few others have asked about.



    1. Bill – i’ve been really busy of late – but i’ll try and clean up the source code and get it up somewhere…

      1. Hi, great solution. May I have the source code please, I would like to customize it for myself. Thanks

  2. Using JavaScript to overwrite the styles attributes is a great solution. I would love to see the solution code and modify to use categories.

  3. Hi Davros

    Great solution, but as soon as you install service pack 1, the colours dont work anymore.

    Are you aware of this?


  4. Im having the same problem as Fibi. “Error: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)” Is there a resolution to this?

  5. I also get the error:

    Error: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

  6. I guess I am too much the newbie. I made the list and placed the webpart on my calendar page, but it did not work. Perdaps I am not placing the CC list in the correct place. I placed it immediately above my calendar. My calendar entries do not change color. Any tips I can try?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

About davros85

Software Engineer @ Microsoft, working with key customers to help them be successful on Azure