Martin Gardner puzzle: red, white, and blue weights

Here's a good puzzle from Martin Gardner's Mathematical Circus. The book is out of print but used copies are cheap.

Problems involving weights and balance scales have been popular during the past few decades. Here is an unusual one invented by Paul Curry, who is well known in conjuring circles as an amateur magician

You have six weights. One pair is red, one pair white, one pair blue. In each pair one weight is a trifle heavier than the other but otherwise appears to be exactly like its mate. The three heavier weights (one of each color) all weigh the same. This is also true of the three lighter weights. In two separate weighings on a balance scale, how can you identify which is the heavier weight of each pair?