Here's how it works:
* Sunlight is made up of all colors of the rainbow. When the sun is high in the sky, these colors reach our eyes directly.
* As the sun sets, the light has to travel through more atmosphere. This means it interacts with more air molecules, dust, and other particles.
* Blue light scatters more easily than other colors. This is why the sky appears blue during the day.
* At sunset, the blue light has been scattered away, leaving the longer wavelengths (red, orange, yellow) to reach our eyes. These colors reflect off the clouds, creating the stunning hues we see.
So, it's not that the sun "gives" the clouds these colors, but rather that the interaction of sunlight with the atmosphere paints them.