There's probably a few ways,
that this could be done.
Here's what I came up with.
I put this image together using 3 layers.
First or top layer,
is a rainbow
light ray kind of image.
The second layer is a silhouette image.
The third layer,
is a star/night background.
The rainbow image was a jpg image.
Which seems to have been created on a black background.
See image below.

What I did was to apply
Alpha To Color using
Black as the color.
On the rainbow layer.
This removed the black pixels for the this layer.
.png)
This seemed to work well for me.
Not sure if you'll have the same results.
Here's is the XCF file of the image.
If you're interested in checking it out.