help with text colors

This issue is under Window_Base. The script itself seems to work partially. Here is the code

def text_color if $game_party.members.size == 0 return white_text else for i in 0...$game.party.members.size @member = $game.party.members return red_text if @member.hp == 0 return yellow_text if @member.hp < @member.mhp / 4 return white_text end endendThe text is defined. There are no error box pop ups. What the issue is, is that this only applies to the first actor, not the range of actors. How do I fix that? Also what this is supposed to do is change text color based on hp, much like the old NES RPGS. Any help is greatly appreciated!Edit: that first conditional branch is because when trying to load a game no text could be drawn since there was no actor on the title screen. So if there are no actors all text is drawn as white.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-text-colors.44481/