# about actor color Interpolate

**URL:** https://discourse.vtk.org/t/about-actor-color-interpolate/4765
**Category:** Support
**Created:** [December 2, 2020, 9:30am UTC](https://discourse.vtk.org/t/about-actor-color-interpolate/4765 "2020-12-02T09:30:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DL\_men](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/43a26b/32.png) [@DL\_men](https://discourse.vtk.org/u/DL_men)
#### Post date: [December 2, 2020, 9:30am UTC](https://discourse.vtk.org/t/about-actor-color-interpolate/4765/1 "2020-12-02T09:30:16Z")

</div>

![ab](https://discourse.vtk.org/uploads/default/original/2X/c/c9663bf78952044f898cc9e087ef779dd088a4ba.png)  
I colored the actor with the following codes:  
data = actor.GetMapper().GetInput()  
data.GetPointData().SetScalars(color\_array)

How to make the bounds clearly without Interpolate like the following pic.

 ![20200103102633445](https://discourse.vtk.org/uploads/default/original/2X/2/2a331bb83b190497ccbc89c0de2280dddcc921db.png)  
SetInterpolateScalarsBeforeMapping may not useful…

---

<div class="post-metadata">

### Author: ![marcomusy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/marcomusy/32/95_2.png) [@marcomusy](https://discourse.vtk.org/u/marcomusy)
#### Post date: [December 3, 2020, 1:39pm UTC](https://discourse.vtk.org/t/about-actor-color-interpolate/4765/2 "2020-12-03T13:39:00Z")

</div>

Creating a LUT with 2 colors and using `SetInterpolateScalarsBeforeMapping ` seems to work for me. Test:

```python
from vedo import *
cub = CubicGrid(n=(20,20,20)).alpha(1).lw(1)
arr = cub.points()[:,0]
lut = buildLUT([(0.42,'red'), (1,'white')])
cub.cmap(lut, arr).show(axes=1)

```

 ![Screenshot 2020-12-03 at 14.23.10](https://discourse.vtk.org/uploads/default/original/2X/5/522aa5c58df0a3c4dd1884170f79b95ad2f7cfbe.png)
