2 or 3 LED colors on a single digital pin

No there is no voltage divider formed by R1 and R3.


The PIV of the diode was ≈ 50V (1N34A) so a 24v input wouldn’t hurt the U1B gate.