ADXL345 Adafruit Pixie RGB LED x and y rotation colour mixing

How about using the HSV colour model?
BfTXY.png

Yellow-orange is around 40 degrees. Blue-cyan is opposite that at around 220 degrees. Magenta is around 300 degrees and green is opposite that at around 120 degrees.

So... Turn your x & y into an angle using atan2(). Add an offset to that angle to adjust it to the desired colours.

What colour do you want when the sensor is level? White or black would be easy.

BfTXY.png