Update 4/7/2017: Post updated and applies to all versions of Dynamics CRM from CRM 2011 to Dynamics 365.
At times it can be nice to define you own colors in charts. You may need to use a specific a corporate color scheme, make it easier to tell certain items apart or simply make the chart easier for the user to understand quickly.
It has always puzzled me how they chose the colors for some of the out-of-the-box system charts in Microsoft Dynamics CRM/Dynamics 365.
Take the “Cases by Priority” chart for example.
At first glance, this chart seems alright. Except when you look at how the series are colored, cases with “Normal” priority are red. In a chart like this red stands out more and most users would associate the red color with some kind of warning sign. On the other hand, the cases with priority high have the less alarming color blue.
Before we get into changing this specific chart, let’s look at some of our options for changing and modifying specific colors.
Export the charts XML file, open it and find the PaletteCustomColors property.
All the colors are listed as RGB colors, separated by a semicolon.
While Dynamics CRM/365 add RGB colors to its custom palette it should be noted that Dynamics CRM/365 accepts
- RGB Decimal (example: 97, 142, 206)
- RGB HEX (example: #4169E1)
- Named colors (example: Blue)
- ARGB (127, 97, 142, 206)
The named colors could prove a lot easier to work with.
So instead of PaletteCustomColors=”97,142,206; 209,98,96; 168,203,104; etc.
we could write PaletteCustomColors=”Blue; Red; Green; etc.
Using the color names also makes it a lot easier to check if you have added them in the correct order.
This page contains an overview of the named colors available to use in charts.
Bonus: There’s one color missing from this list and that is “Transparent”. Transparent is very handy when you need to add data to a chart, but actually don’t want to show it. For example, you may only want to display the value on a chart, but not have the bar or column visible.
Back to the example where we wanted to change the color scheme so high priority cases” are red and normal priority cases are blue.
Since Dynamics CRM/365 lists the series in reverse order (right to left) we know that blue is the first color and therefore goes to the series for high priority.
We want to change the order of the colors so red gets the first high priority series. Then blue and finally green.
Importing it back into Dynamics CRM/365 we will get this result for the “Cases By Priority” chart.
Now the high priority cases are appropriately red and the normal and low priority cases have less alarming colors. Word of caution here. If your list of record does not contain any high priority cases, then the first color will get assigned to the next priority. That means the color red would be assigned to the normal priority cases and so on.
On some charts, it is also possible to add specific colors to specific series, but I’ll save that for a later blog post.
Charts also support ARGB, which is similar to RGB, but there’s four values instead of three. The first value indicates the color’s Alpha transparency. 0 equals completely transparent. 255 is no transparency. 127 is 50% transparent etc.
Alpha transparency values are normally a percentage, but it has to be written in the RGB format which is a value between 0 and 255.
Hope you found the tip useful. As always please sign up for my newsletter and follow me on Twitter. Follow @CRMChartGuy