What's new

Use greyscale image as layer mask

I have a greyscale image (it involves a rounded dark grey boarder around an area filled with a gradient).

My ultimate objective is to save this as a translucent PNG and set it as a background image on a webpage - and then change the background colour of the element to which it is applied so I can change the colour of the image.

The background colour in the CSS would shine through the border of the box in the image, and the area inside that border would be tinted by the same colour.

So I need to convert the image so that the blacker a region is, the more translucent it is, and the whiter it is, the more white it is.

Presumably, this means I need to create a layer mask based on the colours in the image, but I don't know how to do that. Can anybody help?