Well in this case, this could be done purely with the LCL as follows:
- on a canvas, fill with a color
- then draw the icon (in dev, save the result into a file as BMP)
- compare the result with the BMP (pixel by pixel or byte by byte)
BGRABitmap could help for the pixel by pixel comparison, though it is not necessary. In fact, in the test, it would be better to have minimal dependencies, to test for the LCL itself. Also BGRABitmap could override the icon format handlers and hide the problem away somehow.