Template:AngleDisplay

  

This weird little pile of CSS draws a two-segment pie chart based on a single value. The top angle is equal to the input value. The default size is 20px so it fits into text well, which can be specified (without the "px"). The default colours are red and blue, which can also be specified. Transparent colours will not work well, as the top parts overlap the background parts. In order to avoid antialiasing problems, if the desired angle is above 180, the template inverts itself (e.g. a red-on-blue angle of 270 is turned into a blue-on-red angle of 90). Only for angles between 0 and 360 inclusive.