Python outputs different colors from GUI I wrote a Python script to automate my rendering workflow (run from command line with --background).
The problem is that the resulting colors are different from the desired colors that are rendered in the GUI. Python result appears washed-out. Same incorrect result when the script is executed in Blender GUI.
Files are saved as .png. Blender 2.91.2.
GUI result (correct):

Python (incorrect):

Relevant Python code (simplified):
scene.frame_set(0)
bpy.ops.render.render(use_viewport=False, write_still=False)
bpy.data.images[&quot;Render Result&quot;].save_render('./example.png')

A similar but not identical result is reached by changing:

Render Properties -&gt; Color Management -&gt; Display Device -&gt; None
Render Properties -&gt; Color Management -&gt; Gamma -&gt; 1.2 instead of 1.0

then saving the file and running the script.
It seems that there is a difference between settings in GUI and in Python. I've played a lot with different configuration values inside the Python script prior to rendering but this brought me no closer to the desired result.
This is as far as my competence goes, but I would like to better understand the issue and achieve an identical result in my Python script.
Edit: the rendered model is imported from an .fbx file
Gotcha!
My script would pull a HEX color value and try to set it onto an RGB material node primitively without adjusting for gamma correction. The following answer helped me:
How set Hex in RGB Node? (Python)