Driving LEDs at intermediate brightness using only digital pins

Hi there!

I need to implement a small-footprint visual feedback solution, an RGB LED that should be able to produce a handful of colors - including orange. So it's necessary to be able to drive the channels at least at one intermediate brightness. The PWM outputs are already used for more important things, while NeoPixels and softPWM are overkills for my goal with considerable penalty on RAM&flash. Combining 2 digital pins to a 2-bit output would do the job, but I don't know if it's safe with simple resistors? AFAIK switching a pin to input causes it to almost float instead of sinking, maybe this could be used as the de-facto LOW, but I'm afraid a software bug could leave one bit sourcing and the other sinking, and since the resistors giving the right LED currents are not-that-high-resistance, maybe this could result in too high currents and damage...
Or (since one intermediate step is actually enough) should I use a transistor to shunt an additional resistor?

Any idea?
Thanks in advance!

You can use 3 pins? If so, it's probably very feasible to write simple millis based softpwm yourself ( incorporated in loop () ). A 10ms time period and a duration between 0 and 10 ms for each color.

Combining 2 digital pins to a 2-bit output would do the job, but I don't know if it's safe with simple resistors?

As long as no more than 20 mA flows through an output pin, this is safe.

Input pins have impedances of 100 Mohms or greater, unless the voltage exceeds Vcc or is less than 0.

szgabor:
NeoPixels ... are overkills for my goal with considerable penalty on RAM&flash.

Bllcks! It's the obvious solution. Use it. Yes there is an overhead. But it's not overkill, not by any means