Red_Marker, Yellow_Marker and Green_Marker would indeed need to be container fields where you've inserted the desired graphic. This graphic can be a rectangle of the desired color created on a layout in layout mode and then copied to the clipboard and then pasted into the container field after returning to browse mode.
The return type of your calculation would also need to be of type container.
This is how we did it before we had conditional formatting.
With conditional formatting, you no longer need to use this approach.
You can simply stack three conditional format expressions:
warning = "RED"
warning = "YELLOW"
warning = "GREEN"
And specify a Red fill color for the field for the first expression, a yellow color for the second and a green color for the third.