LED cube using 74HC595 and 2N2222
the 74HC595 datasheet says for Voh , the output using 4.5Vdc (5V-10% tol.) will drop 200mV to 500mV with 6mA load.
The transistor needs 5% to 10% Ic to achieve Vce=Vce(sat) at some rated current as they are usually rated at Ic/Ib=10 since hFE drops towards 10% of hFE when saturated as a switch.
The LED prefers 20 mA avg (unless pulsed then 30mA max.)
Thus Ib= 10% of 20mA = 2mA from 5V to ~0.6V (Vbe=0.6 @ 1mA)
So what is Rb from the shift register?
Added
Rb is your base resistor in question.  A full of thumb using the same supply voltage for base and collector sources using any transistor as a switch, I make Rc/Rb =20.  But more accurately you would compute the diode drops and Ic/Ib= 10 to 20 for the base current of 5 to 10%.

you must compute the R voltage drop by subtracting the diode drops for Vbe= 0.65 and Vf=3.1V for Blue/White