Calculate Base Resistor for LED Switch
Since you have a common-cathode LED, you'll want to drive it with PNP transistors in a high-side configuration.







simulate this circuit &ndash; Schematic created using CircuitLab

To calculate R1 and R2:


Average \$V_F\$ for the red and green sides, respectively, are 2.1V and 2.5V.
The MMBT3906 has a saturation voltage of ~0.4V at 10mA collector current.
Let's assume we want 10mA current through each LED
$$R_1 = (3.3V - 2.1V - 0.4V)/10mA = 80\Omega$$
$$R_2 = (3.3V - 2.5V - 0.4V)/10mA = 40\Omega$$


To calculate R3 and R4:


\$V_{EB}\$ is assumed to be ~0.6V.
\$h_{FE}\$ is listed as 100 at 10mA collector current.
$$R_3 &lt;= (3.3V - 0.6V)/(10mA / 100) = 27k\Omega$$
(We'll use 10k since it's a common value and we want a good margin for error.)