Using layermasks to apply colours is a very universal and elegant technique, but if you want the ultimate way of making a quick sunray, here's how you do it:
instead of limiting our custom gradient to black & white, we set it up with dynamic colours right from the start.
Follow all the steps described in the Blocky Gradient Tutorial, but when you apply the colours, use the 'Colour Type' option.
Do this for the left and right colours of both segments !
Now the gradient will pick up the colours of the active Fore- and Backgroundcolours you have chosen in the Main Toolbox.