Both answers are correct - the density of the cloud and the size of water droplets or ice crystals are key - and there is another side to the story as well. The light hitting the cloud affects its apparent color, as well. At dawn or at sunset, one cloud may cast a shadow on all or part of another cloud, making the second cloud look darker. Also, the angle of the sun makes a big difference. A cloud seen by reflected light (on the sun-side) is very different than the same cloud seen from the far side, with sunlight around it or shining through it. And there is a third effect - background color changes apparent color of an object. The same cloud in the same light will appear whiter against a blue-sky background and grayer against a background of higher, white clouds.
Once I saw an entire bank of clouds running from North to South over the ocean to the East at sunset. Every cloud had a dark gray bottom from the shadow of the Earth as they were below the sunset line. Every cloud had a shining white top. It looked like a giant fleet of sailing ships.