I found numerous LED switchback circuits, but none of them seemed to work or achieve what I wanted.
I want the white LEDs to be on and when the second DC source is activated it should turn on the yellow LEDs and power on the coil which turns off the white LEDs.
The capacitor is there to keep the coil on a while longer before switching back to white LEDs when the second DC source is off.
I know that this setup is not good and that's why I'm asking for help. I know that the yellow LEDs can't be in series with the coil because the coil may not get enough power to work.
Can someone tell me or even better draw me the schematic of what would work best?
Also I don't know the best place for the diode to be placed, the goal of it its to protect the overall circuit or components once the capacitor is discharging, if it makes sense.
I suggest you have the (100 Ohm + yellow LEDs) in parallel with the relay. That way both the LEDs and the relay can pull as much current as they need.
Not sure what the diode after the DC Source 2 is for. If you are worried about the inductive spike when turning off the relay, place it parallel to the relay coil with the cathode on the positive rail.
BTW, the 100 uF cap will probably extend the on-time only marginally.
Yellow LEDs has a typical forward voltage of 2.0V and a rated forward current of 20mA .
The typical forward voltage of a white LED is in the range of 3V to 5V.
White LED minimum current required by most types at the above voltage is 10 mA , 20 mA being the optimal range .
If you don't like the soft-turn on that R2/C1 gives in combination with Q1, you could instead use a Schmitt trigger for Q1. But this would necessitate the use of a 12V-powered type or (more sensibly) a little regulator to make something like 5V for your logic IC.
However...
Not quite sure what you intend with this. There are a couple of possibilities; I've modeled it the way I think it is supposed to work in your diagram, but it's not what you mention in the quote above. Maybe you could formulate the requirements one more time, in a different way, so that they're hopefully more conclusive.
Keep in mind that an R/C has both a charge and a discharge period. The delay you get works in both directions. Maybe that's something you wanted to influence with the diode?
Dimensioning of the resistors is in accordance with your LEDs, how bright you want them to be (see @ruilviana above) and R2/C1 depending on the desired switching delay.
It all starts with a clear explanation of what the circuit is intended to do. I suspect that once that's clear, neither of our suggestions will turn out to be the optimal solution.