Preheat oven to 350°F (175°C); grease three 6-inch round cake pans and line with parchment rounds.
Whisk flour, baking soda, and salt in a bowl.
Beat butter and sugar until light and fluffy; add eggs, buttermilk, vanilla, and green food coloring.
Divide green batter among prepared pans; bake 25 to 28 minutes until a toothpick comes out clean; cool completely.
Stack cooled cake layers with green frosting between each tier on a 9-inch round cake board.
Crumb coat entire stacked cylinder with green frosting; chill 20 minutes to set.
Frost exterior with a smooth layer of green buttercream; frost cake board around base to form wide hat brim.
Roll black fondant into a 1-inch wide ribbon; wrap around base of hat cylinder.
Cut a square buckle from yellow fondant; place over black ribbon seam.
Chill until ready to present and slice.