The formula is:
( V[power source] - V[LED forward voltage drop] ) / I[desired current]
So if your power source is 5V and LED Vf is 2V and you want, say, 5mA passing through it:
(5-3)/.005 = 400 ohms
Thank you very much, now I understand even better how to use the formula !
The two different colours of LED need to be treated differently due to the different forward voltages:
2V orange and 3.3V blue.
For 20mA at 5V that means 150 ohms for orange, 82 ohms for blue. Scale up for lower currents.
You'll need enough pcb copper to dissipate the heat, note, if running them at full power, because they
are so small. Another reason to scale down the current.
Please correct me if I'm wrong but my idea was to use one resistor for both colors (using a value strong enough for both):
I have an atmega328p-au (SMD), pin 1 is linked to the blue color, pin 2 to orange color and my idea was to have both pin 1 and 2 connected to the resistor, and said resistor is connected to both the blue and orange lead of the LED.
Since both colors are not on at the same time it would allow me to save space and components.