# Change single color by variable

**URL:** <https://community.grafana.com/t/change-single-color-by-variable/126338>\
**Category:** Grafana\
**Tags:** dashboard-variables, visulazation, templating, bar-chart, color\
**Created:** [July 16, 2024, 12:57pm UTC](https://community.grafana.com/t/change-single-color-by-variable/126338 "2024-07-16T12:57:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ebabeshko](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@ebabeshko](https://community.grafana.com/u/ebabeshko)\
**Post date:** [July 16, 2024, 2:13pm UTC](https://community.grafana.com/t/change-single-color-by-variable/126338/2 "2024-07-16T14:13:21Z")

</div>

Hello, check if this helps:

> [@How to get a dynamic threshold in stat panel?](https://community.grafana.com/t/how-to-get-a-dynamic-threshold-in-stat-panel/111105/12):
>
> May be ‘Config from query results’ transformation would help in your case: [https://play.grafana.org/d/Fc6gwV4nz/transforms-config-from-query?orgId=1&viewPanel=6](https://play.grafana.org/d/Fc6gwV4nz/transforms-config-from-query?orgId=1&viewPanel=6) Add additional field to your query that would contain required value color basing on calculated in the same query dynamic threshold.

---

_[View the full topic](https://community.grafana.com/t/change-single-color-by-variable/126338)._
