Molding or trim helps define a room's style, adding architectural character and dimension to the walls. Window and door molding and baseboards also serve the practical purpose of concealing the gaps that exist in most houses.
As a rule, paint all the trim throughout the house the same color to create a unified effect from room to room.
Within a room, paint all of the trim the same unless you wish to emphasize elements -- a salvaged antique mantel might be left stripped and unstained, for example, while the baseboard, crown molding, door frames, and window frames are all painted creamy white.
Or to play up a marble or stone mantel, you may choose to paint the baseboards a similar color but paint all window and door frames white.
Before investing in enough paint for the job, buy a quart and test it on a piece of poster board. Place this board beside a test board of the wall color to see how they look together.