Why yellow? Well what about when you scare the crap out of a guard. Imagine they are talking to another guard when said guard vanishes instantly. Corvo has stopped time, sleep darted the guard, blinked in and grabbed him and then blinked away again. I've done that and all I get is the other guard says "Witchcraft".
Now if the other guard gets yellow bars overhead when this happens it would show him as being scared and panicky. Maybe make a noise behind him would force him to spin and shoot instantly, maybe causing a blue on blue. It would be one way the AI could be improved for sure. Maybe if you scare them enough they would run away and hide themselves. Would have made the game much more immersive tbh.
But not all guards. The senior NCO guards wouldn't be affected this way. But the officers and younger guards... sure.