# UE4 - How to smoothly blend 3 colors from top to bottom and control gradient strenght?

**URL:** <https://forums.unrealengine.com/t/ue4-how-to-smoothly-blend-3-colors-from-top-to-bottom-and-control-gradient-strenght/123159>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [March 5, 2019, 6:12am UTC](https://forums.unrealengine.com/t/ue4-how-to-smoothly-blend-3-colors-from-top-to-bottom-and-control-gradient-strenght/123159 "2019-03-05T06:12:13Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![IronicParadox](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ironicparadox/32/1194531_2.png) [@IronicParadox](https://forums.unrealengine.com/u/IronicParadox)\
**Post date:** [March 5, 2019, 9:24am UTC](https://forums.unrealengine.com/t/ue4-how-to-smoothly-blend-3-colors-from-top-to-bottom-and-control-gradient-strenght/123159/3 "2019-03-05T09:24:19Z")

</div>

You can also do this with a custom node like so:

```auto

float3 Col;
Col = lerp(C, B, UVGrad/Middle)*step(UVGrad,Middle);
Col += lerp(B,A,((UVGrad-Middle)/(1-Middle)))*step(Middle,UVGrad);
return Col;

```

 ![3colorgradwithmidpointcontrol2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/0/804ac1bd44a08c67756b12189dbaed584072f560.jpeg)

---

_[View the full topic](https://forums.unrealengine.com/t/ue4-how-to-smoothly-blend-3-colors-from-top-to-bottom-and-control-gradient-strenght/123159)._
