I am working on a project creating a gauge package in software, but I am posting here because it is more of a mathematical question.
In short, I need a function to create a color gradient to fill in the rest of the rim of the gauge (See images below).
(source: jyore.com)
The graphics software allows you to draw a radial gradient by specifying the center and radius for two circles. You specify color stops by giving it a positional value between 0 and 1. It then draws the gradient between the two curves of the circle.
The part that I am stuck on is that the angle of the connecting color changes based on the angle of the gauge. Therefore, it seems like the circles defining the gradient are dependent on the angle of the gauge.
Any help that you could provide would be great. If you need any further information, please feel free to ask.