Magic Hat is one of the three skins released in the Excalibur - The Sword of Fate offer. It could be purchased as part of an item deal in March 2017.
Magic Hat could be purchased for $19.99 in a limited time deal that included 1800 DNA and the King Lion skin. This skin was not available for individual purchase and may not be available for purchase in the future.
Details of this skin may vary depending on location, platform or time.
Note: The Excalibur offer with the Magic Hat skin was released again for a limited time in early January 2019.