After the kids and Barney enjoy reading a scary pirate book, the book's character, Rainbow Beard, appears and gives them a treasure map of their own to solve. In order to find the treasure, the group must learn a variety of songs and games about colors and shapes. When they finally find the treasure the kids get a big surprise and learn a valuable lesson about sharing with others.