HUD Progress Bar Change Colour as it progresses

Your progress bar has the percent built in. Drag out a reference to the progress bar and search for “percent” it should come right up.

It works when manually changing the progress bar from the HUD but how would i make it work in game play with just two colors?