Upgrade ditherbuffer from int8_t to int16_t. This allows the dither buffer to handle error margins the size of entire color channels, such as when cyan is corrected to either green, blue, or white on the Inkplate 6COLOR.
Modify the findClosestPalette function to take the 3 color channels individually, thus allowing them to take the negative values, or >255 values, that occasionally appear with allowing ditherBuffer to have this expanded range.
Modify the findClosestPalette function to more easily account for tiebreakers. (The given code is functionally the same as before, but a one-line tweak, suggested in the comments, will allow it to randomly choose from any tiebreaker color on a project that can properly seed rand().)
ditherbuffer
fromint8_t
toint16_t
. This allows the dither buffer to handle error margins the size of entire color channels, such as when cyan is corrected to either green, blue, or white on the Inkplate 6COLOR.findClosestPalette
function to take the 3 color channels individually, thus allowing them to take the negative values, or >255 values, that occasionally appear with allowingditherBuffer
to have this expanded range.findClosestPalette
function to more easily account for tiebreakers. (The given code is functionally the same as before, but a one-line tweak, suggested in the comments, will allow it to randomly choose from any tiebreaker color on a project that can properly seedrand()
.)