Here's the structure:
Employee Name,
You are receiving this written warning for failure to comply with the company dress code. As discussed (in the past, recently, on such and such dates) it is expected that your work attire will portray a professional and appropriate appearance as outlined in the dress code policy.
This is important in order for the company to maintain a positive image with Customers and Staff, and by not adhering to the dress code, other staff may perceive this as being appropriate behavior.
I trust you will take the necessary steps to comply with the dress code and that ultimately, it is your responsibility to make the change.
Failure to bring your attire up to company expectations may lead to further disciplinary action.