In majority of cases, dermatologist will examine your skin and may ask certain questions to diagnose melasma clinically most of the time. Woods lamp examination or dermoscopy can be done by doctor to know depth of pigmentation.