Step 1: Recall how the code is built.
The code starts at 0 with black and then follows the order of the rainbow after brown and red. The digits increase by one for each colour in the sequence.
Step 2: Write the sequence with digits.
0 black, 1 brown, 2 red, 3 orange, 4 yellow, 5 green, 6 blue, 7 violet, 8 grey, 9 white.
Step 3: Read off yellow.
Orange is 3 and green is 5, so the colour between them, yellow, must be 4.
This also removes the other options: 2 is red, 3 is orange and 5 is green.
Final Answer:
Yellow stands for the digit 4. \[ \boxed{4} \]