Different colors of sedimentary rock are determined by the environment where they are located. For example, red rocks form where oxygen is present. Darker sediments form when the environment is oxygen poor.
So, basically, the weather and surroundings of the rock, so B.