Diagnosing melasma typically involves a visual examination by a healthcare professional. In some cases, a Wood's lamp examination may be used to better see the depth of the pigmentation. A detailed medical history, including any recent hormonal changes, medication use, and sun exposure, is also important for accurate diagnosis.