# Opacity setting changes background color

**URL:** https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852
**Category:** ParaView Support
**Created:** [October 25, 2019, 7:06pm UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852 "2019-10-25T19:06:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![skindl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@skindl](https://discourse.paraview.org/u/skindl)
#### Post date: [October 25, 2019, 7:06pm UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852/1 "2019-10-25T19:06:40Z")

</div>

Hi,

I’m generating an image that has a sphere with the “Texture Map to Sphere” filter applied. When I change the opacity of the texture map, the background of the image also changes colors while the Pipeline Browser shows that it hasn’t changed colors.

The image below shows an opacity of 1.

 ![op1](https://discourse.paraview.org/uploads/default/original/2X/1/1d8c8e71b9578be96e1c4c215b3b46c12618ee4a.jpeg)

In this image the opacity of the texture map is 0.5.

 ![5](https://discourse.paraview.org/uploads/default/original/2X/8/8d9743dcfda3611afd5870ddb7f0731d381710bf.jpeg)

Is there a way to maintain the color of the background while changing opacity? This is using Paraview 5.7.0.

Thanks,  
Scott

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 28, 2019, 7:57am UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852/2 "2019-10-28T07:57:35Z")

</div>

I do not reproduce.

---

<div class="post-metadata">

### Author: ![skindl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@skindl](https://discourse.paraview.org/u/skindl)
#### Post date: [October 28, 2019, 12:25pm UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852/3 "2019-10-28T12:25:51Z")

</div>

After some more digging, I’ve found that it depends on the data representation. If I render my dataset as a surface, then the background does not change with the opacity of the texture map. If the dataset is rendered as a volume, then the background does change with the opacity of the texture map.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 28, 2019, 12:36pm UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852/4 "2019-10-28T12:36:23Z")

</div>

Can you give a step by step reproduction procedure ?

---

<div class="post-metadata">

### Author: ![skindl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@skindl](https://discourse.paraview.org/u/skindl)
#### Post date: [October 28, 2019, 1:08pm UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852/5 "2019-10-28T13:08:40Z")

</div>

In my case this is what I’m doing. I can upload my data file if it would help.

1. Open dataset. (I’m loading data from an HDF file using an XDMF file)

2. Apply a threshold filter to the dataset.

3. Change representation of threshold to “Volume.”

4. Add a “Sphere” filter.

5. Apply a “Texture Map to Sphere” filter.

6. Change the opacity of the texture map under the “Styling” section.

More specifically, I can see now that the texture map is not necessary. The background is changing if the threshold filter is rendered as a volume and the opacity of the sphere is changed.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 28, 2019, 4:46pm UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852/6 "2019-10-28T16:46:17Z")

</div>

I reproduce :

- Open ParaView
- UnstructuredCellType, Apply, Volume representation
- Sphere, Apply, Opacity 0.9
- Background changes

Please open an issue on our gitlab if possible, thank you.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 30, 2019, 4:26pm UTC](https://discourse.paraview.org/t/opacity-setting-changes-background-color/2852/7 "2019-10-30T16:26:08Z")

</div>

[https://gitlab.kitware.com/paraview/paraview/issues/19425](https://gitlab.kitware.com/paraview/paraview/issues/19425)
