question: public static float [ ] temperatureToRGB ( int degreesK ) { int k = MathUtils . constrain ( degreesK , 1000 , 20000 ) ; float a = ( k % 100 ) / 100.0f ; int i = ( ( k - 1000 ) / 100 ) * 3 ; return new float [ ] { interp ( i , a ) , interp ( i + 1 , a ) , interp ( i + 2 , a ) } ; }
target:  Convert a color temperature value (in Kelvin) to a RGB units as floats. This can be used in a transform matrix or hardware gamma control.