Here's one of the unsolvable cases :
Color 248,248,248 is a pure grey, but with vanilla behavior, it shades to a slighty pink tone as it gets darker.
That's because they're using a RGB palette.
248,248,248 in RGB is 248 luminosity, moving down 16 points in luminosity should produce 232,232,232 which is a perfect grey. But if the algorithm is using a simpler function to generate the base colors, it might misalign the numbers. I don't know what programming people were trying to use, so I can't tell you what's wrong with it. Now the colors should work fine with grey if you use a proper RGB scale, but they won't work right with many other colors. For example, if you have 218,126,33 (a slightly desaturated orange), its luminosity is roughly 118 using Paint's luminosity scale (0-240). Its true luminosity is 125.667. If you try to go down 16 points in Paint luminosity, you get 188,108,29 on RGB which has reduced the red by 13.8%, the green by 14.3%, and the blue by 12.1%. This unevenness results in the darker color looking like a slightly different color.
If this were done in the HSL palette, it would be 20,177,118 moving to 20,177,102 and it would make a perfect transition into a darker color with exactly the same hue and saturation.
Something I've seen in Microsoft's Paint:
Standard graphics use a 32-bit RGBA palette which is fully compatible with the 24-bit RGB palette (the extra 8 bits add only an alpha channel for transparency), and while Paint uses this palette, the program functions as if it were on a 241-length HSL palette. If you select a color by choosing its exact RGB coordinates, Paint will save that color based on the closest HSL coordinates, which themselves may be a better match for a slightly different set of RGB coordinates. So Paint will have the screen display a different color from what you had selected. The only colors Paint gets correct are anything along the greyscale.
I don't know what people are doing to make grey turn pink as it gets darker, but it reminded me of what Paint does. Ultimately, while I don't know what's going on in the code, I can assure you that the code is written wrong at some point and that there is no mathematical difficulty in making a true HSL palette work perfectly for this. The trick, then, might be to get modern graphics cards to use HSL. I don't know if they're compatible.