# Color space of RGB values in vtkProperty

**URL:** https://discourse.vtk.org/t/color-space-of-rgb-values-in-vtkproperty/16088
**Category:** Development
**Created:** [October 9, 2025, 3:47am UTC](https://discourse.vtk.org/t/color-space-of-rgb-values-in-vtkproperty/16088 "2025-10-09T03:47:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [October 14, 2025, 4:03pm UTC](https://discourse.vtk.org/t/color-space-of-rgb-values-in-vtkproperty/16088/2 "2025-10-14T16:03:19Z")

</div>

@lassoan, as far as I know, `vtkProperty` does not use sRGB color space by default unless you explicitly enable it using `vtkRenderWindow::SetUseSRGBColorSpace`.

However, when this option is enabled, the behavior you described appears to be a bug. Internally, the mapper converts the values to sRGB color space for PBR interpolation, regardless of the window setting. You can find the relevant code here: [https://gitlab.kitware.com/vtk/vtk/-/blob/33e80863c0c3499993ce422b372d82f0546fc2b1/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx#L1459](https://gitlab.kitware.com/vtk/vtk/-/blob/33e80863c0c3499993ce422b372d82f0546fc2b1/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx#L1459).

This behavior has been consistent since PBR was introduced in VTK, which you can review here: [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/5584/diffs#119ad58b35cad6a89360ea74ac1db4ca126c5816\_900\_1129](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/5584/diffs#119ad58b35cad6a89360ea74ac1db4ca126c5816_900_1129).

To fix this, gamma correction should depend on whether the window utilizes sRGB color space.

@Michael FYI

---

_[View the full topic](https://discourse.vtk.org/t/color-space-of-rgb-values-in-vtkproperty/16088)._
