In AndO3131 version I made some error making unit more flat that it should be.
I made some screenshoots showing that this isn't simply blend.
I did 3 things, calculate effective shade of pixel based on sum value of colors.
subtract some linear values based on new shade.
finally blend with background color.
This 3 steps allowed me recreate most of behavior of TFTD palette.
You can toy with my implementation here: https://jsfiddle.net/hgcufgL7/14/ and see difference with original colors (upper is calculated, lower is original in each depth line).
I have not played TFTD (or UFO for that manner) but that does look positively sexy.