Thanks for the query.
In large number of cases it may be due to being obese where it can result due to increase in insulin
levels in blood resulting in a spillover of insulin in the skin causing more melanin
production and ultimately resulting in dark patches called as ACANTHIOSIS NIGRICANS.
Sometimes obesity may result in friction of thigh skin resulting in dark skin.
Treatment is eating healthy, doing regular exercises and losing weight.
However sometimes it can be due to diabetes
or rarely in cancer also or in polycystic ovary syndrome
You may consult your doctor for the relevant investigations.
You may apply locally aloe Vera
or cocoa butter along with lifestyle modifications.
Best of luck