# Color

**URL:** https://discourse.vtk.org/t/color/3439
**Category:** Web
**Created:** [June 1, 2020, 3:50pm UTC](https://discourse.vtk.org/t/color/3439 "2020-06-01T15:50:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Lokeshwar\_Obuli](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lokeshwar_obuli/32/1852_2.png) [@Lokeshwar\_Obuli](https://discourse.vtk.org/u/Lokeshwar_Obuli)
#### Post date: [June 1, 2020, 3:50pm UTC](https://discourse.vtk.org/t/color/3439/1 "2020-06-01T15:50:47Z")

</div>

What is the exact code to set the color and opacity of the actor. I am trying to render a .vtp file.

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [June 3, 2020, 3:00pm UTC](https://discourse.vtk.org/t/color/3439/2 "2020-06-03T15:00:02Z")

</div>

If you just want color and opacity to be set on the actor, you can do `actor.getProperty().setColor(1, 1, 1)` (for white color), and `actor.getProperty().setOpacity(1)` (for fully opaque).

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [June 3, 2020, 4:46pm UTC](https://discourse.vtk.org/t/color/3439/3 "2020-06-03T16:46:34Z")

</div>

> <https://github.com/Kitware/vtk-js/issues/1472>
>
> What is the exact code to set color, opacity for an actor?
