Change HP and MP color when max hp/mp

How would i change the HP/MP color when it is 100 percent. 
I want it green at 100 percent but if it isn't 100 percent i want to it be a different color.

Thanks in advance!
class Window_Base < Window


def draw_actor_hp(actor, x, y, width = 124)


draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)


change_color(system_color)


draw_text(x, y, 30, line_height, Vocab::hp_a)


if actor.hp == actor.mhp


draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,


Color.new(0, 255, 0), Color.new(0, 255, 0))


else


draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,


hp_color(actor), normal_color)


end


end


def draw_actor_mp(actor, x, y, width = 124)


draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)


change_color(system_color)


draw_text(x, y, 30, line_height, Vocab::mp_a)


if actor.mp == actor.mmp


draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,


Color.new(0, 255, 0), Color.new(0, 255, 0))


else


draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,


mp_color(actor), normal_color)


end


end
Thank you! Works perfectly.
where in the script database would u put that, I would like to use it, but have no clue where to put it
Paste it as a new script anywhere above Main.
thanks 🙂 will try it now.

Hmm i tried it but it the same as it always is. Is it because I use yanfly battle engine
@Chibi, please PM Trihan about this issue, as you are hijacking someone else's thread.


Closed.

Original thread: https://forums.rpgmakerweb.com/threads/change-hp-and-mp-color-when-max-hp-mp.38892/