The bricks' colors are the same as in the real palette.
Check out Lego Mosaic Generator by Luke Marchant – a cool tool made in Substance 3D Designer that turns images into a PBR Lego mosaic material. The colors of the bricks are taken from the official Lego palette.
The generator is customizable, you can change the number of inset bricks and hollow studs and sliders for wear and tear to add scratches and bite marks.
Marchant is still working on polishing Lego Mosaic Generator and promised to publish it once it's fully done.
Here are the artist's other works: