A yellow object and a white object would be not discernible under a very narrow-band yellow light, or a mix of two narrow-band red and green lights of right proportions. This is how LEDs and lasers emit light, but totally unlike hot objects (like Sun) or fluorescent lamps (like "natural light" LED lamps) emit light.