The colonies were no longer making much profit for the few years after WW2 either, to the point where Suriname got ejected more than it got liberated from imperial rule. Sweden, Norway, Denmark, and Luxembourg never even had colonies of note to get rich off (unless you count European wars as colonies).
Oil and natural gas together with heavy investment from the USA were more important to the western countries' current wealth than anything else. The USSR messing up the once powerful economies of eastern Europe also helped drive down competition, as did the unrest in most of Asia. Having some infrastructure and political designs from the height of imperial power sure helped, but imperialism is hardly the reason these countries are as rich as they are today. In fact, Spain and Portugal were much stronger and richer countries during the height of colonial rule yet they are comparatively poor to both north-west-European and the Scandinavian states today.