The problem isn't in your code:
A single standard red LED drops about 1.8V, and with the proper resistor an Arduino pin can drive such a LED at the right current.
Three LEDs (especially with a blue one among them) in series need more voltage than the Arduino pin can deliver ( 5V), so they won't light up.
Maybe two LEDs with a recalculated resistor will just about work.
Try leaving out the blue LED; it has the highest voltage drop (about 3V to 3.3V), and adding one other LED will already go too close to, or beyond, 5V, and the LEDs won't light up.
You could put the LEDs in parallel, each with their own properly calculated resistor, but the total current you pull in that configuration may exceed the maximum current allowed per Arduino pin (this depends on the Arduino used: about 20mA for most Arduinos, but only about 7mA for SAMD21-based Arduinos, for example).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…