The description of width is inverted from what it is.
The implementation is currently that a smaller number, like 2 results in a longer tail. The value 8 gives the shortest tail of only 2 pixels.
A simple solution to this is:
uint8_t inv = 10 - width; // maps 2→8, 3→7, ..., 8→2
return (((color&0xFF0000)/inv)&0xFF0000) + (((color&0x00FF00)/inv)&0x00FF00) + (((color&0x0000FF)/inv)&0x0000FF);
The description of width is inverted from what it is.
The implementation is currently that a smaller number, like 2 results in a longer tail. The value 8 gives the shortest tail of only 2 pixels.
A simple solution to this is:
uint8_t inv = 10 - width; // maps 2→8, 3→7, ..., 8→2return (((color&0xFF0000)/inv)&0xFF0000) + (((color&0x00FF00)/inv)&0x00FF00) + (((color&0x0000FF)/inv)&0x0000FF);