Mrs Goodsworthys Hats Puzzle

The Puzzle:

Mrs Goodsworthys Hats

Mrs Goodsworthy has 6 gorgeous hats. 3 are green, 2 are blue, and 1 is canary yellow.

Four of her friends, Janet, Collette, Melanie, and Anya have come for tea and are trying on her hats. Mrs. Goodsworthy helps each friend put on a hat and has them stand in a line as shown below.

Janet > Collette > Melanie > Anya

None of the ladies can see what color hat she is wearing.
Janet can see the colors of the hats Collette, Melanie, and Anya are wearing.
Collette can see the colors of the hats Melanie and Anya are wearing.
Melanie can see the color of the hat that Anya is wearing.
Anya cannot see the color of any of the hats.

Mrs. Goodsworthy asks her friends what color hat each of them is wearing, and Janet says she can't tell. Collette says she isn't able to tell either, and Melanie says she can't tell.

Anya, on the other hand, is able to announce the color of her hat. How was Anya able to figure out the color of her hat, and what was the color?

Do you have the answer? Check against our solution!