It is permissible for a man to get a tan but it is not permissible for him to be obsessed with his body and his color to the extent that he spends money on that or expose his body to people or look at people exposing their bodies.
A proper Muslim doesn’t do these things.