radial gradients near the edges of the screen create visible banding
When using radial gradients, there seems to be an issue that the number of gradient steps is calculated wrong. It seems it's using the distance between gradient end and the screen border instead of the gradient start and gradient end.
Example code:
ctx.save()
ctx.radial_gradient(0, 0, 80, 0, 0, 115) # 5 colors
#ctx.radial_gradient(0, 0, 80, 0, 0, 116) # 4 colors
#ctx.radial_gradient(0, 0, 80, 0, 0, 117) # 3 colors
#ctx.radial_gradient(0, 0, 80, 0, 0, 118) # 2 colors
ctx.add_stop(0.0, (0.0, 0.0, 0.0), 1.0)
ctx.add_stop(1.0, (1.0, 0.0, 0.0), 1.0)
ctx.rectangle(-120, -120, 240, 240)
ctx.fill()
ctx.restore()
Increasing the size of the rectangle beyond the edges of the screen does not help