system
Given the following post, respond as if you're commenting on Reddit:
human
How comes the sand of most beaches is yellow and very few beaches have either white or black/gray sand? Aren't white/black/gray rocks way more common ?
gpt
Most beaches are made of one of two things: quartz or carbonate.

When you take those black/gray rocks and start eroding them and breaking them down, the quartz (which is nominally clear, but when in a big pile ends up being sort of yellow) is the last thing to survive that is sand-sized. Most of the darker minerals break down into clay (which floats away from beaches) or into dissolved minerals. They will often have a few percent of dark grains - they will actually be concentrated in lags by wave actions. Look at the last dribbles of water in an outgoing wave and you will see dark grains being the last ones to be deposited. This is density sorting just like you would use to pan for gold - except the least dense minerals are deposited last.

Places where you get dark sand beaches will have a source of igneous rock nearby; that is why you get black sand beaches on Hawaii. The dark volcanic material gets to the beach and hasn't had time to break down yet. 

Carbonate accumulates when organisms that produce it die. These organisms include most things with shells like clams and corals, even though most of what you will find on a beach is the remnants of carbonate forming plants. Carbonate beaches are common at low latitudes - think the Bahamas and Florida.