How to get the exact color as output that we are looking for?
The values and position of your lights (and world/HDRI) will affect the color of your object, and all the indirect lights as well, so you can't get the exact same color, except, of course, if you use an Emission node.
I've noticed though that if you delete all source of light, create a sun, reset its rotation, give it a Strength of 3.1 and an Angle of 0, you'll get the exact same color in render. So if you want to keep the exact same color you need to stay around these values, or if you play with one of these values you need to compensate with another.
If you test Emission or a sun with this precise setup but still don't get the exact same color, it may have to do with the Render settings (example: the Color Management settings, View Transform must be on Standard).