The Custom Colors feature is a powerful tool that enables users to define their own logic for color indicators, and display that logic in visualizations.
The color drop zone contains several types of color indicators based on different logic. This allows users to easily display color indicators in a way that best matches the data being investigated.
Users may have their own requirements around the logic behind color indicators, that aren’t met with the out of the box options. In this case, you can build your own color logic.
This can be done in two ways:
- Formatting by cell – this is logic defined on the cube from the Formulate module. Click here to learn about formatting by cell.
Custom Colors drop zone – this is logic defined in the datasource and reflected in the Discover module.
Watch this video on using the 'Custom Color' option in the color drop zone for data driven conditional highlighting
Custom Colors Drop Zone
If the datasource contains measures representing colors (i.e., a table containing a column that contains RGB color codes), then these colors can be displayed in your visualizations in Discover. To show these colors, drop the measure chip that represents the color measure into the Color drop zone. From there, drop the chip into the Custom Colors sub-drop zone, to display your custom colors in the query.
For example, you might want to display sales in either green or red, depending on whether they fall above or below a specified value. This can be achieved by defining these colors in the datasource. The user can then add the sales color chip to the query, and easily identify the red and green values.
In this way, custom colors give users an alternative to custom KPIs. Unlike KPIs, they can be defined in the datasource or data model (formatting by cell), and can be displayed in any visualization. This makes it very easy for users to simply add the color chip to query and identify the significant colors in the resulting visual. Also unlike custom KPIs, they are not defined against other measures.
Custom colors are defined by values that are RGB integers that reflect the color spectrum.
The valid range for an ordinary RGB color is zero (0) to 16,777,215 (&H00FFFFFF). The high byte of a number in this range always equals 0; the lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively. The red, green, and blue use 8 bits each, and are represented by an integer between 0 and 255 (&HFF).