Gradient swirls are made using the spiral coordinate space for the colors and the polar coordinate for the alpha channel.

In both the polar and spiral coordinate spaces a control value called theta (angle) is derived from the initial angle value plus a multiple of the actual angle of each pixel (the angular component amplitude) plus/minus a portion of the radius (the radial component amplitude).

In the polar coordinate space the radius varies from 0 to 1 and replaces the "X" coordinate while theta varies from 0 to 1 and replaces the "Y" coordinate.

In the spiral coordinate space theta varies from 0 to 4 but is then decomposed into X and Y values ranging from 0 to 1 to produce a 4 color mix. 0 theta is 100% upper left which blends into 100% upper right as theta increases to 1, then to lower right as theta increases to 2, then lower left as theta increases to 3, and finally back to upper left as theta approaches 4.

The following has a radial component amplitude of 0, so it does not "swirl".
Object=Gradient(RGB(255, 0, 0), RGB(0, 255, 0), RGB(0, 0, 255), RGB(255, 0, 255), 0, 0, 0, 6400, 1, 1)
{
	Colorspace==RGBA32
	Alpha=255, 0, 0, 0
	Function=S0, Spiral, 0, 2, 0
	Function=X0, Linear, 0, 0, 0
	Function=Y0, Linear, 0, 0, 0
	Function=S1, Spiral, 0, 2, 0
	Function=X1, Linear, 0, 0, 0
	Function=Y1, Linear, 0, 0, 0
	Function=S2, Spiral, 0, 2, 0
	Function=X2, Linear, 0, 0, 0
	Function=Y2, Linear, 0, 0, 0
	Function=S3, Polar, 0, 4, 0
	Function=X3, Linear, 0, 246, 0
	Function=Y3, Linear, 1, 120, 0
}
The fifth color comes from another gradient of solid yellow under the 4 color gradient.
Object=Gradient(RGB(255, 255, 0), RGB(255, 255, 0), RGB(255, 255, 0), RGB(255, 255, 0), 0, 0, 0, 6400, 1, 1)
{
	Colorspace==RGBA32
	Alpha=255, 0, 255, 0
	Function=S0, Cartesian, 0, 0, 0
	Function=X0, Linear, 0, 0, 0
	Function=Y0, Linear, 0, 0, 0
	Function=S1, Cartesian, 0, 0, 0
	Function=X1, Linear, 0, 0, 0
	Function=Y1, Linear, 0, 0, 0
	Function=S2, Cartesian, 0, 0, 0
	Function=X2, Linear, 0, 0, 0
	Function=Y2, Linear, 0, 0, 0
	Function=S3, Polar, 0, 0, 0
	Function=X3, Linear, 0, 246, 0
	Function=Y3, Linear, 0, 0, 0
}
This is the 4 color gradient without the yellow circle

Now we add some radial component to make the gradient swirl. This is a value of 10, which causes a quarter turn (90 degrees) from the edge to the center. We have also changed the underlying circle to have a blend of white and yellow.

Here we have increased the radial component for the colors to 40 but left the alpha channel at 10.

The result of reversing the radial component for the alpha channel.

Setting the color channels to -10 as well.

Increasing the radial component amplitude to 120 for all channels.