private Color determineColor(){
  float hpRatio=(float)model.getValue();
  float r=Math.min((1.0f - hpRatio) * 2.0f,1.0f);
  float g=Math.min(hpRatio * 2.0f,1.0f);
  return new Color(r,g,0.0f);
}

private Color determineColor ( ) { float hpRatio = ( float ) model . getValue ( ) ; float r = Math . min ( ( 1.0f - hpRatio ) * 2.0f , 1.0f ) ; float g = Math . min ( hpRatio * 2.0f , 1.0f ) ; return new Color ( r , g , 0.0f ) ; }
determine the health bar color .
