Optical absorption of NiPS3 in the near-infrared, visible and near-ultraviolet regions