You could use the widget, but for a simple traffic light with three options you could also opt for three different containers with conditional visibility based on the percentage, inside these containers you have the correct traffic light pictures or css classes.
It may not be the most pretty option, but it's a bit more visual than a custom widget.
Let me know if it solved your issue. :)