title: (Arduino) How to isolate the color temperature value and print it to a specific color?
body: <p>I am new to arduino and I am just wondering how to isolate the color temperature value and assign it to a specific color.</p>
  
  <pre><code>#include &lt;Wire.h&gt;
  #include "Adafruit_TCS34725.h"
  
  
  
   Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_700MS, TCS34725_GAIN_1X);
  
  
  void setup() {
    // put your setup code here, to run once:
    Serial.begin(9600);
  
  
    if (tcs.begin()) {
        Serial.println("Found sensor");
  
    }
  }
  
  void loop() {
  
  
    uint16_t r, g, b,c, colorTemp, lux ;
  
     tcs.getRawData (&amp;r, &amp;g, &amp;b, &amp;c);
  
     colorTemp = tcs.calculateColorTemperature_dn40 (r, g, b,c);
  
  
     if (4025&lt;= (colorTemp, DEC) &amp;&amp; (colorTemp, DEC) &lt;= 4200) {
     Serial.print("Green") ;
  }
       else
        {Serial.print(" ");}
  }
  </code></pre>
  
  <p>when I try to run this code, it just keeps printing Green even though the color temperature doesn't match the constraints.</p>