I can't say that i agree with this approach. There are two cases:
1. Black foreground. Here, you convert all the colored pixels into
translucent black. This is not how the native rendering works - the
final "outlier" pixels (when they are rendered on screen) should stay
colored (bluish, yellowish) to reproduce the native rendering with high
fidelity.
2. Non-black foreground (say white foreground on black background or any
other combination). This is not supported at all.
So, even in the first case you're losing the native rendering fidelity,
and the second case is not supported at all.
Thanks
Kirill