If the electrons cannot absorb any energy
from the light, then the radiation passes through unmolested,
so the material appears to be transparent. However, if the
electrons can rob the light of any energy, then the light
is dimmed, obscured or absorbed. As a result, the material
appears more or less opaque.
It was not known until this century why diamond
and graphite, both made from carbon atoms and possessing
the same number of electrons are optically so different.
Scientists now know that the crystalline structure of a
substance determines how tightly its electrons are held
by the atoms and chemical bonds in the material.
At the wavelengths that humans can see, light
does not have enough energy to excite the tightly held electrons
in diamond, so diamond appears transparent to us. Impurities
in the diamond, contribute electrons that can absorb light
at characteristic wavelengths, to give the diamond varying
hues of color. For example: pure diamond appears transparent,
nitrogen in diamond causes a yellow to orange tint, and
boron causes a blue coloration.
Some of the electrons in graphite are loosely
held, so they can absorb and reemit (reflect) the energy
of the light. The electrons' interactions with light give
graphite a metallic luster.