Looking at the ships this could work for some, but be less noticeable/effective on others. Some ships have a good amount of color on them like the Resource Harvester or a Cruiser, but things like Freighters or Colony Ships would have to have these color sections added to their image as they don't seem to have any at all currently.

The square around a highlighted unit though could definitely reflect diplomatic status though.