Though hats are traditionally worn to shield the sun out of one’s eyes, protect the wearer from rain, or to keep the heat from escaping one’s head, in the case of the Kentucky Derby each May, hats of all kinds are worn to bring good luck.

As they come in all shapes and sizes, many Derby hats are just as much of a spectacle as the event itself.

For folks planning to celebrate in the appropriate chapeau for Derby Day (May 5), or just want to add something new and special to their wardrobe, here is a roundup of hat stores throughout San Francisco with a range of head coverings to meet their needs.

Unfortunately Mrs. Dewson’s Hats (Home of the Willie Hat!) is about to go the way of the Dodo, but long-time staple ADS Hats is hanging on. Located now on Valencia near 15th in the Mission, the hats here range from fun to fashionable to formal, including sun hats, skullcaps, fedoras and more.

The inventory consists of a mixture from local artisans, brand name- and smaller designers from throughout the United States. The store also carries creations by ADS Hats owner Elina Davenport, who may be found knitting caps while patrons shop.

Brave browsers can travel into the belly of the tourism beast otherwise known as Pier 39 near Fisherman’s Wharf where Krazy Kaps is located. The store carries all kind of tourist trinkets and goods, including fleece pullovers, key chains, etc., but is most well known for its wide hat selection, ranging from novelty to utilitarian. This is the only store on the hat tour where shoppers will find baseball hats, but they will also find costume hats, knit, leather hats and more.

Taking shoppers back in time, Goorin Bros. can trace its roots back to 1895 when master craftsman Cassel Goorin sold his first hat off a cart in Pittsburgh. The tradition passed down to his sons, who opened the original store on Stockton Street in North Beach, where the flagship still stands today. Now it’s run by Cassel’s great grandsons, and has expanded across the country, with two other San Francisco shops, one on Geary near Grant in the Union Square area and the other on Haight and Ashbury.

The inventory at each Goorin Bros. store varies, designed to suit the tastes of the neighborhood shoppers. For example, the North Beach shop carries more traditional choices like panama and heritage hats, but the Union Square choices are a bit more upscale, while Haight Street styles are more funky and casual.

In addition, the North Beach location recently expanded to a custom shop next door, which features guest milliners who can customize and personalize hats. For example, if the band on the hat is not to someone’s liking, it can be swapped out for a new pattern or color.

Like Goorin Bros, Paul’s Hat Works on Geary near 26th Ave in the Richmond district also practices old-school hat making. Four stylish roommates are carrying on the tradition of creating custom Panama and beaver felt hats — a tradition that was first started on the same spot by Napoleon Marquez in 1918.

Napoleon passed the business down to his godson Kelley Bowling, and then to Michael Harris and his wife Judy, who ran the shop until just a few years ago. Abbie Dwelle, Wendy Hawkins, Olivia Griffin and Kirsten Hove took the shop over from Michael, but not before they apprenticed with him, learning the craft and history of making hats.

Hats here can be customized to the needs, specifications and sizing of customers, sometimes with the aid of an antique conformature, a device that maps the measurements of one’s head. Hat hounds can also bring in vintage hats for steaming, cleaning and reshaping. In addition, Paul’s Hat Works carries a small selection of ties, tie clips and cufflinks.

With the apparent comeback that proper hats are making in the fashion world, it’s surprising that there are not more specialty hat stores like these in the city. But citizens should take heed if they want to keep specialty hat stores from closing, like Mrs. Dewson’s. San Franciscans should put a lid on it.