https://surma.dev/things/ditherpunk/ talks about this a bit, and he implemented it as well. In code it will likely be called blue noise dithering.