# Change tint of image in widget component, using BP

**URL:** <https://forums.unrealengine.com/t/change-tint-of-image-in-widget-component-using-bp/422559>\
**Category:** UI\
**Tags:** unreal-engine, Widget, Blueprint, question\
**Created:** [April 13, 2018, 7:46pm UTC](https://forums.unrealengine.com/t/change-tint-of-image-in-widget-component-using-bp/422559 "2018-04-13T19:46:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3ae0505e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3ae0505e](https://forums.unrealengine.com/u/anonymous_user_3ae0505e)\
**Post date:** [April 13, 2018, 7:46pm UTC](https://forums.unrealengine.com/t/change-tint-of-image-in-widget-component-using-bp/422559/1 "2018-04-13T19:46:37Z")

</div>

I have a Blueprint Class (`DetectionActor`). It has a Widget component attached to the root; the Widget component has the Widget Class set to `DetectionMat`, which is a Widget Blueprint I have created.

DetectionMat has a single image widget attached to the root (named `Patch9`). I want to change the color of Patch9.

 ![237366-mybp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/3/e936ddfb8e5ac9e16c2a2984c280281d19170e52.png)

Manually changing any of the following properties in the editor does what I want:

- DetectionMat/ColorAndOpacity
- DetectionMat/ForegroundColor
- DetectionMat/Patch9/Tint
- DetectionMat/Patch9/ColorAndOpacity

## How can I change these properties at runtime, from DetectionActor’s BP?

Here’s what I’ve tried in my blueprint (all failed):

1. Call `Set Tint Color and Opacity`, passing in Widget component reference. Does nothing.
2. Cast the Widget component to a `DetectionMat` (the editor says this will always fail).
3. Get Children of Widget, in an attempt to get a reference to Patch9 (this gives me Scene Components, which can’t be cast to UserWidget)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 13, 2018, 10:47pm UTC](https://forums.unrealengine.com/t/change-tint-of-image-in-widget-component-using-bp/422559/2 "2018-04-13T22:47:08Z")

</div>

You can access the embedded widget like so:

 ![237404-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/0/eb03a95a92a3ba7e11182718e0fcc6a1ef737503.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3ae0505e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3ae0505e](https://forums.unrealengine.com/u/anonymous_user_3ae0505e)\
**Post date:** [April 16, 2018, 4:40pm UTC](https://forums.unrealengine.com/t/change-tint-of-image-in-widget-component-using-bp/422559/3 "2018-04-16T16:40:07Z")

</div>

Thank you, Everynone.

---

<div class="post-metadata">

**Author:** ![Groxar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/groxar/32/550875_2.png) [@Groxar](https://forums.unrealengine.com/u/Groxar)\
**Post date:** [September 11, 2019, 3:01pm UTC](https://forums.unrealengine.com/t/change-tint-of-image-in-widget-component-using-bp/422559/4 "2019-09-11T15:01:20Z")

</div>

On UE 4.22 there’s a warning saying Brush is a read only property
