The darkness is because the cloud is so dense that light can't pass through it. Without getting scattered due to the water droplets present in it. These droplets of water in a cloud are about a micrometer to a millimeter in size, and at that size they basically scatter all wavelengths of light uniformly.
So, clouds appear black during or before rain