|
|
G = input * 12 + 2
|
|
My idea was to manually store all the RGB values in an array, then create an association between the each RGB and temperature values. eg 20 degrees would be {0,14,255} 20.25 would be {0,26,255} so on so so fourth. |
|
|
20.00 degrees --> (0, 14, 255) 20.25 degrees --> (0, 27, 255) 20.50 degrees --> (0, 39, 255) 20.75 degrees --> (0, 52, 255) 21.00 degrees --> (0, 65, 255) 21.25 degrees --> (0, 77, 255) 21.50 degrees --> (0, 90, 255) 21.75 degrees --> (0, 102, 255) 22.00 degrees --> (0, 115, 255) 22.25 degrees --> (0, 128, 255) 22.50 degrees --> (0, 140, 255) 22.75 degrees --> (0, 153, 255) 23.00 degrees --> (0, 166, 255) 23.25 degrees --> (0, 178, 255) 23.50 degrees --> (0, 191, 255) 23.75 degrees --> (0, 203, 255) 24.00 degrees --> (0, 216, 255) 24.25 degrees --> (0, 229, 255) 24.50 degrees --> (0, 241, 255) 24.75 degrees --> (0, 254, 255) |