Someone help this is physical science 8th grade

Why does the colored filter transform the white light of the leds inside of the lamps into red green and blue