> For the complete documentation index, see [llms.txt](https://docs.infotopics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infotopics.com/hierarchyfilter/configuration/conditional-coloring.md).

# Conditional coloring

Conditional coloring can be used to highlight items in the hierarchy based on measures. It is advised to create an aggregation to use for conditional coloring. Look at the "Aggregation" page in this wiki for more information on how to set that up.&#x20;

Conditional coloring based on an aggregation on the profit measure might look like the image below, where each negative value is colored pink.

<figure><img src="/files/Xp4YNKmvcmiuh1IPVzyj" alt=""><figcaption></figcaption></figure>

To enable this feature, first go to the "Formatting" tab in the "Options" page in the configuration, where you need to select the column/level you want to apply conditional coloring on.&#x20;

<figure><img src="/files/jlrgjXdAg1fwoP9jYdtB" alt=""><figcaption></figcaption></figure>

After setting the level, scroll down to the conditional coloring options.

<figure><img src="/files/p40RegyGA0hNNanjCEuZ" alt=""><figcaption></figcaption></figure>

Here, we already selected the sum aggregation on the SUM(Profit) measure to be used for conditional coloring.&#x20;

Select an upper and lower bound to dictate what values should be colored. You can click the colored boxes to change the color.

After which you need to select if you want to color the full background of each item or only the text. After clicking submit, the conditional coloring should be visible on the selected level.

Instead of using an upper and lower bound, you can also select equals coloring to only color items that are exactly equal to the inserted string. In this example we used "Inactive".

<figure><img src="/files/61OktSXnbZG6GVYEMODE" alt=""><figcaption></figcaption></figure>

Latly, you can select the "Gradient" checkbox to color every item from smallest to biggest value on a color gradient.

<figure><img src="/files/NxIauK1u1ClxKDO1TC7m" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.infotopics.com/hierarchyfilter/configuration/conditional-coloring.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
