I have the following MWE
dat = [1,7,3,6,9,4]
plt.bar(range(len(dat)), dat, color='#1C5B26')
plt.savefig(path/tofile.pdf)
When I run this, then inspect the pdf, the hex value of the bars can be very far from what I specified. I would like the plot to be exactly the color I have specified, but I can even visually see that it is not close the the given hex value.
Any reasons this is happening/workarounds?
EDIT:
Here is what I get when inspect. For the given hex value above I should get (28,91,38). I know its a small difference, but I thought the problem was worse when I was using a different "display in ..." option. sRGB is the option that I found gave me the best match, but still not perfect.