Other than a royal wedding, no event is more strongly associated with the wearing of ostentatious hats than the Kentucky Derby. It’s a chance for anyone with tickets to the infield — or just an invitation to sip juleps and watch it on TV at a friend’s house — to do their best Princess Beatrice impersonation. When the horses burst through the gates on Saturday, May 5, the heads of male and female spectators will be covered in straw and ribbon and flowers.

View Photo Gallery: For infield hats, the bigger and brighter, the better.

One rule of thumb for the perfect Derby hat, according to Hats in the Belfry e-commerce general manager James Sackor: “The bigger the brim, the better,” he said. “The big-brim styles have always been the go-to.”

Sackor says that customers begin shopping for Derby hats earlier and earlier each year — with some purchasing them in January and February. He recommends buying the hat before the dress, since a good hat can be harder to find. Men should pair a classic straw fedora with a bow tie for a perfect Derby look, while for women, “Color is what makes the hat pop,” says Sackor.

The tradition of hats at the derby dates back to the era when it was improper for women to be seen hatless at formal events. As the years passed and the strictures on women’s fashion loosened, Derby hats became larger and more expressive — though not quite as out there as that famous Philip Treacy fascinator.

View Photo Gallery: The post time for the 138th Kentucky Derby is scheduled for 6:24 p.m. on Saturday, May 5.