How to wire the double color LED indicator light?

Generally, a two-color indicator has three leads. Let’s take a red and green indicator as an example. The three lines on this indicator are of different colors. The red line represents the red diode, and the green line represents the green diode. In the actual use of the equipment, connect different lines to the lines set by the installation equipment to complete the wiring work.

The two-color lamp bead has 3 pins, as you can see from the picture. When the switch S1 is closed, there is current flowing through the green tube of the two-color light-emitting lamp bead, so the two-color light-emitting lamp bead emits green light; when the switch S2 is closed, the current passes through the inner red tube of the two-color light-emitting lamp bead, thus emitting red; If the two switches are closed at the same time, the current flows through the two light-emitting diodes at the same time, and the red and green light up at the same time. At this time, what we see is the mixed color light, which turns into yellow light.

How to wire the double color LED indicator light?