Switch/Case function with tilt switch and RGB

narmstrong:

  if (tiltState = HIGH) {

That's one problem. This will indeed always evaluate "true".

Try replacing it by:

  if (tiltState == HIGH) {

One is assignment, the other boolean comparison.