Controlling LED w/ Proximity Sensor

Hello All,

I would like to control the color of my LED Strip using the information generated by my proximity sensor. I was able to complete this tasking using the brightness parameter of the LED Strip, but it hasn't been as straight forward transferring the logic to tweaking the color parameters of the LED Strip. Any Suggestions?

#include <FastLED.h>
#include <NewPing.h>
#define DATA_PIN 7
#define NUM_LEDS 155
#define CHIPSET WS2813
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
#define TEMPERATURE_1 MetalHalide
#define TEMPERATURE_2 MetalHalide
#define PING_PIN 12 // Arduino pin tied to both trigger and echo pins on the ultrasonic sensor.
#define MAX_DISTANCE 120 // Maximum distance we want to ping for (in centimeters). Maximum sensor dista
NewPing sonar(PING_PIN, PING_PIN, MAX_DISTANCE);
int proxcont = 0;
const int numReadings = 20 ;
int readings [ numReadings ] ;
int readIndex = 0;
int total = 0;
int average = 0;
int newValue = 0;
int lastpixel = 0;

// How many seconds to show each temperature before switching
#define DISPLAYTIME 20
// How many seconds to show black between switches
#define BLACKTIME 3

void loop(){
proxcont = sonar.ping_cm();
int brightness = 160 - 2.5 * proxcont;
if(proxcont <= 0 ) {
brightness = 0; }
if(proxcont >= 64 ) {
brightness = 0; }

FastLED.setBrightness(brightness);
delay(29); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
Serial.print("distance: ");
Serial.print(proxcont); // Send ping, get distance in cm and print result (0 = outside set distance range)
Serial.println("cm");
delay(35);
// draw a generic, no-name rainbow
static uint8_t starthue = 0;
fill_rainbow( leds + 0, NUM_LEDS - 5, --starthue, 20);

// Choose which 'color temperature' profile to enable.
uint8_t secs = (millis() / 1000) % (DISPLAYTIME * 2);

if( secs < DISPLAYTIME) {
FastLED.setTemperature( TEMPERATURE_1 ); // first temperature
leds[0] = TEMPERATURE_1; // show indicator pixel
}

else {
FastLED.setTemperature( TEMPERATURE_2 ); // second temperature
leds[0] = TEMPERATURE_2; // show indicator pixel
}
FastLED.show();
FastLED.delay(29);
}

void setup() {
delay(1000); // power-up safety delay
Serial.begin(9600);
Serial.println("resetting");
LEDS.addLeds<WS2813,DATA_PIN,RGB>(leds,NUM_LEDS).setCorrection(TypicalLEDStrip);

for(int thisReading = 0 ; thisReading < numReadings ; thisReading++) {
readings [ thisReading ] = 0 ; }

}