Colors in VTK have no declared color space, with consequences throughout the codebase

Thanks for looking into this. I agree sRGB/Linear conversion is not handled everywhere it should. I’m mostly unavailable for the new 3 weeks so just sharing some thoughts here for now:

  • sRGB/Linear color spaces is not a concept every developer has in mind, people often copy and adapt existing code. Unifying existing conversion with a common API and clear comments about why it’s required would highlight places where it’s needed and potentially reduce occurrence of new code missing conversion.
  • Have you looked into the influence of the vtkRenderWindow::UseSRGBColorSpace flag? Could it be used to hide the fix as you suggest?
  • Referencing this post from @sankhesh