Multiplexing Red and green dual led not being switched on properly
Closely related to this Q&amp;A.

Our eyes are more sensitive to green; if the LEDs are equally efficient, you need about twice the current in Red in order for them to appear equally bright, which will presumably generate a good yellow.

A first step will be to experiment with a single LED and two current sources (or variable resistors or two PWM channels on your MCU) to find what relative currents or ON periods give the colour you want.

A second step would be to generate that current ratio somehow; perhaps with a larger resistor in series with Green and a smaller one with Red. Or connect the LEDs in antiphase and drive them one way round for green, another for red, adjustable in software. Or some other means according to the hardware or software changes yo uare willing to make.