199 {
201
202
203
204
206
207
208
209 uint8_t heatramp = t192 & 0x3F;
210 heatramp <<= 2;
211
212
213 if (t192 & 0x80) {
214
215 heatcolor.r = 255;
216 heatcolor.g = 255;
217 heatcolor.b = heatramp;
218
219 } else if (t192 & 0x40) {
220
221 heatcolor.r = 255;
222 heatcolor.g = heatramp;
223 heatcolor.b = 0;
224
225 } else {
226
227 heatcolor.r = heatramp;
228 heatcolor.g = 0;
229 heatcolor.b = 0;
230 }
231
232 return heatcolor;
233}
LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video(uint8_t i, fract8 scale)
The "video" version of scale8() guarantees that the output will be only be zero if one or both of the...
Representation of an RGB pixel (Red, Green, Blue)