Excellent questions - Bees make wax from wax glands (mirror glands) on their abdomens. The wax is a translucent white when it is first excreted and as it ages it changes color.
What changes the color is the footprints of the bees. The more bees that walk on the wax the darker it is. Wax that is used to cap honey isn't walked on much so there are few footprints and the wax remains creamy colored.
Wax used to make cells were brood is located gets lots of traffic and gets dirty faster.
You can see where the brood or babes were located on this old frame - the cells are dark, almost black. The honey was stored in the corner so the wax is much lighter in color.
The wax is a wild colony is the same - lighter where the honey is stored and darker where the bees have the babies.
If you have a question, comment below or find me at the Brookline, NH 4th of July Parade!