If the tenant was allowed to change the paint to a different color while they were renting the apartment or house out then yes the tenant can be required to repaint the apartment or house back to the original color.
But just repainting the apartment or house then tenant is usually not responsible for repainting the interior when moving out.
But if the walls were damaged and needs cleaned or repainted because of more than just wear or tear then the landlord can deduct the cost of repainting out of the security deposit.
But other than that the landlord is usually responsible for doing the painting after the tenant moves out if the landlord wants to paint the interior again.