Does paint change the value of a painted hat?
Paint will not necessarily increase the value of a hat for a potential buyer, and very well may make it much harder to sell said painted hat. Certain colors are more desired than others, mostly the ones that cannot be found through random drops, e.g. black, white, team colors, after eight, mann's mint, pink as hell, and lime.
In general, you would likely get more value selling the paint separately, and it would be much easier to sell than finding someone who wants both the hat and the color together.