In the 18th century, gambling became widespread and popular amongst rich men (and women) in England. They would play for hours at gaming clubs, and lose entire fortunes at their tables. At Brooke's, a club frequented by Charles James Fox, the men wore a sort of gambling uniform. The Whig politician was said to be rarely out of it. Here's a description:
The gamesters began by pulling off their embroidered clothes, and put on frieze greatcoats, or turned their coats inside outwards for luck. They put on pieces of leather (such as are worn by footmen when they clean the knives) to save their laced ruffles; and to guard their eyes from the light and to prevent tumbling their hair, wore high-crowned straw hats with broad brims, and adorned with flowers and ribbons; masks to conceal their emotions when they played at quinz.
Club Life of London, Vol. I (of 2) by John Timbs