Whilst writing the colour suggestion an alternative way of doing it occurred to me, though I still like the idea for the sake of the colour-blind. Would it be practical to add a character toggle for "Confirm attack factionmate" and "Confirm attack ally" popping up an "Are you sure you wanted to do that?" dialogue box equivalent to the boxes for "confirm high ap action" or "confirm give away items"? I would default the confirmation dialogue box on for factionmates but off for allies (but I'm sure some people would want to turn on the ally prevention attack setting).
Could reduce bad blood from failure to ID purple or mashing attack in a raid situation.