Yes, there is one.
The strategy is: the first person always picks the color he sees and the second always picks the opposite of the color he sees. Then if the two hats are of the same color, the first person lives and if the two hats are of different colors, the 2nd person lives. It turns out there is one and only one person can survive.