# Can't color a XML Unstructured Grid (\*.vtu)

**URL:** https://discourse.vtk.org/t/cant-color-a-xml-unstructured-grid-vtu/8660
**Category:** VR/AR
**Tags:** file-formats
**Created:** [June 4, 2022, 9:31am UTC](https://discourse.vtk.org/t/cant-color-a-xml-unstructured-grid-vtu/8660 "2022-06-04T09:31:20Z")
**Posts on this page:** 1
**Showing post:** 12

<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: [August 16, 2022, 8:05am UTC](https://discourse.vtk.org/t/cant-color-a-xml-unstructured-grid-vtu/8660/12 "2022-08-16T08:05:55Z")

</div>

> [@vtkClipClosedSurface with RGBA](https://discourse.vtk.org/t/vtkclipclosedsurface-with-rgba/10140/1):
>
> I am not sure if this is a proper solution, but it might work if you create a new mapper at the end of the `setColors` function.
> 
> ```auto
> output.GetPointData().SetScalars(colors);
> 
> + vtkDataSetMapper mapper = vtkDataSetMapper.New();
> + mapper.SetInput(output);
> + actor.SetMapper(mapper);
> }
> 
> ```

I got that solution from here:  
[https://discourse.paraview.org/t/how-to-color-unstructured-grid-vtu/10140/2](https://discourse.paraview.org/t/how-to-color-unstructured-grid-vtu/10140/2)

---

_[View the full topic](https://discourse.vtk.org/t/cant-color-a-xml-unstructured-grid-vtu/8660)._
