why are salt water fish more colorful?
While somewhat true in general, that's not uniformly true. African cichlids are much more colorful than salmon, tuna, perhaps even the bulk of saltwater fish.
I think it's very true that reef fish are much brighter and more colorful than freshwater fish, and the vast majority of fish in aquaria come from reefs (mostly because they are so pretty).
If I had to take a guess I'd say that the fact that the reefs already have so many bright colors, combined with nearly limitless hiding places from predators (unless that hiding place happens to contain a moray...) has lead to reef fish becoming so bright, in order to stand out for mates.
Also, the lighting on reef tanks (much brighter lighting, actinic bulbs) seems to make the color of fish stand out much more strongly than the standard strip light on most freshwater tanks. When I upgraded my lighting to start growing plants the colors on all my fish really started to pop out much more than in the past.