# vtu file coloring

**URL:** https://discourse.vtk.org/t/vtu-file-coloring/9392
**Category:** Support
**Tags:** proposal
**Created:** [September 19, 2022, 6:27am UTC](https://discourse.vtk.org/t/vtu-file-coloring/9392 "2022-09-19T06:27:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chengchengjing](https://discourse.vtk.org/user_avatar/discourse.vtk.org/chengchengjing/32/4395_2.png) [@chengchengjing](https://discourse.vtk.org/u/chengchengjing)
#### Post date: [September 19, 2022, 6:27am UTC](https://discourse.vtk.org/t/vtu-file-coloring/9392/1 "2022-09-19T06:27:27Z")

</div>

Opening a vtu file with paraview has the following variables, how can I use one of them to colorize through C++?

 ![$BMZ}9(%QBF64KTO9J3DNHT](https://discourse.vtk.org/uploads/default/original/2X/4/4c7e2d94a2ff36360ada4222f5d06b7a37999d94.jpeg)

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [September 19, 2022, 2:32pm UTC](https://discourse.vtk.org/t/vtu-file-coloring/9392/2 "2022-09-19T14:32:16Z")

</div>

Hello,

Please, take a look at this: [How to get the data out of a .vtu file?](https://discourse.vtk.org/t/how-to-get-the-data-out-of-a-vtu-file/7153).

take care,

Paulo

---

<div class="post-metadata">

### Author: ![graysuit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/graysuit/32/5107_2.png) [@graysuit](https://discourse.vtk.org/u/graysuit)
#### Post date: [September 20, 2022, 11:01am UTC](https://discourse.vtk.org/t/vtu-file-coloring/9392/3 "2022-09-20T11:01:41Z")

</div>

Duplicate, but in another language:

> [@Can't color a XML Unstructured Grid (\*.vtu)](https://discourse.vtk.org/t/cant-color-a-xml-unstructured-grid-vtu/8660):
>
> Hi I have code, which can color \*.vtp, \*.vtk. But same code fails to color \*.vtu. I have list of vtkactors. And I specify which actor to set properties from. This code which gets all column names from actor index: public static List\<string\> getColumns(int actorIndex) { List\<string\> colums = new List\<string\>(); vtkActor actor = actors[actorIndex]; var output = actor.GetMapper().GetInputAsDataSet(); var cell = output.GetCellData()…
