Answer: 9 gallons
Explanation:
Given: Ratio of colors in painting:
4 parts blue, 3 parts red, and 3 parts green.
Total parts = 4+3+3 =10
Fraction of blue =

Since, Quantity of blue color used = 12 gallons
Let total quantity of color be x,

Total color used = 30 gallons
Color used for green part only =

Hence, 9 gallons of paint were needed for the green part of the painting.