Going up in color bit depth

from blog Computer Graphics & Programming with Pekka Väänänen - 30fps.net, | ↗ original
The simplest thing: how to extend a low bit depth color to a higher bit depth one? Well, there’s a trick.