Accelerometer data into RGB led values

If you're holding an accelerometer by hand, the changes in acceleration are very short-lived. A spike when you begin to move your hand, a spike in the opposite direction when you stop your hand. That's why you're getting flickers.

You might want to look at my playground code, Arduino Playground - ADXL330 - it uses an accelerometer and it models a "mood" for it, a numeric level of agitation that decays over time. Shaking the device increases the agitation in the mood. Letting it rest will reduce the agitation in the mood. Then it describes the mood using RGB colors: a red and fast "angry" heartbeat down to a blue and calm "serene" heartbeat.