Units are not painted in civ-specific colors certainly. Though this doesn't matter much when all units are inside the appropriate borders, in cases where that isn't true, having civ-specific colors would add clarity.
Vuldacon wrote a great civ-specific color guide at https://forums.civfanatics.com/attachments/civ_specific_units_32_pcx_files-zip.54769/. Looking at both the Word document and the PCX files in GIMP, and particularly when also looking at ntp##.pcx files in GIMP, it all makes sense. Colors 0 - 15, and then all even ones in the 16 - 63 range, are replaced with Civ-specific colors... and in the ntp##.pcx files, those are indeed all variants of the main color.
This also explains what all the unspecified "All Other" colors in my Color Palette Editor (as based on Rhye's document) are - they are additional colors for units. This category can thus be enhanced.
From an implementation standpoint, I'm thinking creating a Unit32 class would be sensible. It would store the original PCX version (not BufferedImage) to allow color-replacement, have access to the ntp##.pcx files, and have convenience methods to request a unit icon for a certain civ, which it would then generate on-demand, or retrieve from a cache. Caching is sorta important since it would be used on the map, and that would be an awful lot of re-generation of images otherwise.
Added in 1.22.