
Converting White to Alpha
To convert white to alpha in Krita, follow the following steps:
1: open the image that you want to edit in Krita.
2: select the layer that you want to convert, and add the filter Adjust -> Cross-channel color adjustment to it. In the filter settings, you should see two dropdown list buttons, one for "Channel" and one for "Driver channel," and a curve editor.
3: change "Channel" to "Alpha."
4: change "Driver channel" to "Lightness."
5: move the left control point all the way to the bottom.
Important: the right control point should stay in the center. That's because this filter has a range of "-100%" to "100%." We want zero lightness to result in "-100%" alpha, but we don't need 100% lightness to add another 100% to the alpha. 100% lightness should result in "0%" alpha added or subtracted.
6: click "OK."
This will make every pixel in the layer have its alpha value equal to its lightness. Black pixels will become fully transparent, while white pixels will become fully opaque.
You can now use this as a clipping mask for other layers.
Fixing White Edges after Converting White to Alpha
If you have followed the steps above, you should see that white has been converted to alpha, but there are undesirable white "edges" on your layer.

This happens because the filter only changes the opacity of the pixels, it hasn't changed their RGB color, which means that any pixel that was grey became 50% transparent and remains still grey. They haven't been converted to white.
To fix this, simply add a Color Overlay layer style to make the whole layer white. If you have a filter layer, the color overlay should be added to the filter layer, so that the color changes AFTER the cross-channel adjustment, not before.

Having finished this, you can save your transparent image to use it elsewhere.
Converting Black to Alpha
To convert black to alpha, the steps are the same as above but instead of making the left side of the cross-channel adjustment filter -100, we make the right side -100, inverting which level of lightness subtracts the alpha.
Video
Gallery
