Hi hearing at your problem there could be 2 possibilities one is as rightly said it could be due to vitB12 deficiency which leads to pigmentation on knuckles , nears nails. take atleast 10 injections of vitB12.
second could be due increased mineralocorticoid hormonal
activity for which hormonal evaluation needs to be done. take care