Bon Apetite!

You are one of three missionaries captured by cannibals (If you're non-religious, feel free to change "missionary" to "used car salesman"). But they're compassionate cannibals so they devise an opportunity for the three of you to save your lives. They put a hat on your head and tie each of you one of three poles which are positioned in a straight line, on top of kindling which will be lit afire for those who fail the test. Here's what they tell you:
"You did not see what color of hat we put on your head. If you can guess your hat's color, you are free to go. There are only two colors available, red and blue. We started with five hats but two got singed when we broiled our last two visitors. Two of the original hats were blue. Three were red. Good luck to you all!"
As luck would have it, you are tied to the pole in front. You can see neither your hat nor your companions. The missionary tied to the second pole can see you and your hat but can't see her own, nor the missionary behind her. However the missionary at the rear can see both of you and your hats. You are all instructed not to communicate with one another. When one of you knows the color of one's own hat, that person may call out that color. If it is correct, everyone will be set free. If it is incorrect, the fire will be lit.
Several minutes pass by in silence. Then several more. Finally, you call out your hat color and everyone goes home happy (except for the hungry cannibals). What color did you call out?
Take a few minutes to see if you can solve this puzzle on your own. If you're then sure of your answer, click on the hat of your choice to check your answer. But don't get burned!
