Material looks different from when loaded when re applied

I have a chair model. when i load the gltf model it renders properly with good color however when I reapply the same material again it looks very washed out in the same light settings.

  1. chair when it is loaded and rendered
  2. chair when the same textures are re applied
  3. picture of the relevant code

the material has 3 maps (diffuse,normal and roughness), i also tried it with different colored map and it resulted in the same issue.
please let me know if i have to put the entire code on here

You need to set the colorspace on the textures.

texture.colorSpace = SRGBColorSpace;

thanks a ton. The only clarification I need is should I do it to roughness and normal too or just the diffuse is enough. I assume normal map does follow the sRGBColorSpace format.