Hello,
Melasma is caused by hormonal changes, which stimulate a temporary increase in your body's production of melanin. People with darker complexions are more prone to this condition than people with lighter skin.
Generally, this type of pigmentation resolves gradually and needs no attention. However, you can use cosmetic preparation that have demelanizing contents or seek a guidance of a dermatologist. Alternately, you have the option of cosmetic laser therapy to help you look better, though it may be a costlier.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.
Forgive me but I was young from my phone and did not review before I submitted my post.
"Over the years, the spots have spread from my back to my neck and chest. Recently, the patches started to appear on my forearms as well."
I hope this clears the first two sentences in the second paragraph.