To find out how many bags of each color should be made, we need to first find the total ratio of bags, which is 3+4+5+8=20.
Next, we find the number of bags in each color by dividing the color's ratio by the total ratio and multiplying by the total number of bags to be made (2000):
Red bags: (3/20) * 2000 = 300 bags
White bags: (4/20) * 2000 = 400 bags
Yellow bags: (5/20) * 2000 = 500 bags
Black bags: (8/20) * 2000 = 800 bags
So the factory should produce 300 red bags, 400 white bags, 500 yellow bags, and 800 black bags.