# Color by Value

Sometimes it is useful for the color of the indicators to show if the value is negative or positive, the parameter `color_by_value` handles that automatically.

The following example shows how to use it:

```python
s.plt.indicator(
    data=[{
        'align': 'center',
        'title': 'Positive case',
        'value': 10,
    }, {
        'align': 'center',
        'title': 'Negative case',
        'value': -10,
    }, {
        'align': 'center',
        'title': 'Neutral case',
        'value': 0,
    }],
    order=0,
    color_by_value=True
)
```

<figure><img src="/files/wg9Zu8IbTfhMXAnTnE6U" alt=""><figcaption><p>Color for indicators based on value</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.shimoku.com/dev/elements/charts/indicators/color-by-value.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
