# How to get opacity from the white color? (Materials)

**URL:** <https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109>\
**Category:** FX\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [October 11, 2024, 9:18am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109 "2024-10-11T09:18:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 11, 2024, 9:18am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/1 "2024-10-11T09:18:22Z")

</div>

I have a white image with a transparent background.

I want the white part to have a percentage of opacity (Variable Opacity).  
I’m interpolating between black and white and multiplying by the resulting gray.

However the image becomes darker instead of transparent.

I guess maybe I need to separate the black pixels from the white ones or something like that…

Does anyone know the correct way to do this?

This is my material:

 ![0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/a/93afb93edbf54cd34a1be31697ffb1bd913c5e12.png)

Thank you so much!!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 11, 2024, 9:39am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/2 "2024-10-11T09:39:09Z")

</div>

If opacity isn’t in A, try one of RGB. Something might be close…

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 11, 2024, 9:49am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/3 "2024-10-11T09:49:22Z")

</div>

Hi @ClockworkOcean

The image is fine… I just want to give it a transparency percentage on the opaque part… (I thought that by painting some pixels black I could achieve that) Is this possible?

---

<div class="post-metadata">

**Author:** ![ZaharKostic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZaharKostic](https://forums.unrealengine.com/u/ZaharKostic)\
**Post date:** [October 11, 2024, 10:26am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/4 "2024-10-11T10:26:19Z")

</div>

if you have a black background then increasing transparency will make opaque part evidently darker as you said. you goal is not quite clear. if you have an img with 0 opacity background and \> 0 opacity parts, then just multiply opacity by whatever variance you need.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 11, 2024, 10:31am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/5 "2024-10-11T10:31:21Z")

</div>

I’m sorry… the material is working… I should have tested it well before opening the thread…

 ![Captura de pantalla 2024-10-11 112609](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/5/695ae116700c41a3ab3c5d983ebbac420630565a.png)

I also get the same effect using this node.

![Captura de pantalla 2024-10-11 112746](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/5/4a5d124bec5a70b79b8b82cf46d7e1f50578556a.png)

Moderators may delete this post if they deem it necessary.

Thank you so much @ClockworkOcean

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 11, 2024, 10:32am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/6 "2024-10-11T10:32:57Z")

</div>

Thank you for your comment…  
My mistake… the problem never existed.  
I’m ashamed now.

> [@How to get opacity from the white color? (Materials)](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/5):
>
> I’m sorry… the materialf is working… I should have tested it well before opening the thread… I also get the same effect using this node. [Captura de pantalla 2024-10-11 112746] Moderators may delete this post if they deem it necessary. Thank you so much @ClockworkOcean

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 11, 2024, 10:37am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/7 "2024-10-11T10:37:41Z")

</div>

It might be hard to tell how much ammo you have? What about fading left to right? 😃

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 11, 2024, 10:40am UTC](https://forums.unrealengine.com/t/how-to-get-opacity-from-the-white-color-materials/2063109/8 "2024-10-11T10:40:48Z")

</div>

It can always be improved… I will try your idea too…

![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/e/a/9ea3a222befd4b7a6440e1c84e942b793012b94e.png)

Thank you so much @ClockworkOcean
