system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:They say an object is of a particular color because it absorbs all colors but that particular color that is reflected back but what is that "absorption" exactly. What is going on in terms of atomic level to make an object absorb or reflect a particular color?
gpt
It all comes down to electrons.

Electrons exist in certain energy levels around the atom. At rest, they're in the lowest energy state, but they can absorb energy to become excited - and move up to higher energy states.

However, they can only absorb energy in precise amounts - exactly the amount needed to increase their energy state to a whole integer multiple.

This means they can go from ground to 1st excited, or ground to 2nd excited, but they can't go from ground to 1.5.

Now for light, the amount of energy that a photon contains is a function of its frequency, which itself can be determined from the wavelength - and its wavelength that determines color.

This means certain energies are associated with certain colors of light. And electrons need to absorb certain energy to increase their energy level. If this amount they can absorb is equal to the amount in photons of a particular color, they'll absorb light of that color.

Now, photons can also decay back to the ground state, and they do this by releasing photons. They don't always go from their excited state straight to the ground state, they can fall through intermediary states and release photons equal to the difference in energy of these intermediate steps.

If that energy corresponds to light of a certain color, they emit light of that color.

Put this together and it means that substances can absorb light of one color and emit light of another color or mixture of colors. Or they can absorb light outside the visible spectrum and emit light in the visible spectrum, or absorb light in the visible spectrum and emit light outside the visible spectrum.