The color of a sedimentary rock is often mostly determined by iron, an element with two major oxides.