RGB LED + FSR

I’m trying to set up an RGB LED so that depending on how hard you press the FSR you get a certain color, but it doesn’t seem to work and I would like to add crossfading or something so that it goes through the whole spectrum before reaching the given color.

This is what I have so far:

// Pressure sensor controls RGB LED with crossfading

// INPUT: Touch Sensor should be connected to 5V and GND

int pressPin = 5; // Touch Sensor output connected to A5
int pressVal = 0; // Variable to store the input resistance from Touch Sensor

// OUTPUT: Digital pins 9, 10 and 11

// LED’s cathodes should be connected to digital GND

int redPin = 9; // Red LED, connected to digital pin 9
int greenPin = 10; // Green LED, connected to digital pin 10
int bluePin = 11; // Blue LED, connected to digital pin 11

// Function variables

int redVal = 0; // Variables to store the values and send to pins
int greenVal = 0;
int blueVal = 0;

void setup()
{
pinMode(redPin, OUTPUT); // Sets the pins as output
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}

// Main program
void loop()
{
pressVal = analogRead(pressPin); // Read the resistance value at the input pin
// 1. find out your maxmium Press Value
// 2. Divide the pressVal with the maxmium value

if (pressVal <= X) // Lowest bound of resistance range when blowing (0-X)
{
pressVal = (pressVal * 3) / 4; // Normalize to 0-255

redVal = 256 - pressVal; // Red from full to off
greenVal = pressVal; // Green from off to full
blueVal = 1; // Blue off
}
else if (pressVal > X && pressVal <= Y) // Middle of resitance range (X-X)
{
pressVal = ( (pressVal-341) * 3) / 4; // Normalize to 0-255

redVal = 1; // Red off
greenVal = 256 - pressVal; // Green from full to off
blueVal = pressVal; // Blue from off to full
}
else // Upper bound of resistance range (X-X)
{
pressVal = ( (pressVal-X) * 3) / 4; // Normalize to 0-255

redVal = pressVal; // Red from off to full
pressVal = 1; // Green off
pressVal = 256 - pressVal; // Blue from full to off
}
analogWrite(redPin, redVal); // Write values to LED pins
analogWrite(greenPin, greenVal);
analogWrite(bluePin, blueVal);
}

}