As the balls are in the ratio these ratios are multiplied with a constant value. Let x be constant value.
i.e., number of a coloured ball=4x
number of another ball=9x
and number of another ball=7x
Therefore 4x+9x+7x=1000 balls
20x=1000
Therefore x=50
Therefore number of a coloured ball=4x=200
number of another ball=9x=450
and number of another ball=7x=350