# Color Variant Bindings

**URL:** <https://forum.inductiveautomation.com/t/color-variant-bindings/87758>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [March 22, 2024, 4:56pm UTC](https://forum.inductiveautomation.com/t/color-variant-bindings/87758 "2024-03-22T16:56:34Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 22, 2024, 5:58pm UTC](https://forum.inductiveautomation.com/t/color-variant-bindings/87758/11 "2024-03-22T17:58:05Z")

</div>

> [@amarks](#):
>
> but doing the average of two integer-converted hex colors **does not** give you a shade in-between.

You may be interested in using an HSV method.

> [@Code review: Modifying RGB by Manipulating HSV colors](https://forum.inductiveautomation.com/t/code-review-modifying-rgb-by-manipulating-hsv-colors/58295/4):
>
> That’s fair. I would expect better performance out of a more Java-based solution, but it’s very likely not going to be enough to actually matter. For posterity, a reimplementation of your method: def mulColorV(rgbHex, factV): from com.inductiveautomation.ignition.common import TypeUtilities from java.awt import Color javaColor = TypeUtilities.getColorFromString(rgbHex) hsl = Color.RGBtoHSB(javaColor.red, javaColor.green, javaColor.blue, None) hsl[2] = max(0.0, min(hsl[2] \* factV, 1.0)) h…

---

_[View the full topic](https://forum.inductiveautomation.com/t/color-variant-bindings/87758)._
