Python outputs different colors from GUI
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)