
Clipping Layers Using Inherit Alpha
The simplest method to clip one layer to another in Krita is to use the confusingly named Inherit Alpha feature. In the Layers docker, you will see that every layer and layer group has a small "α" (Greek letter alpha) icon to its right side. Clicking on it toggles the Inherit Alpha property of that layer or layer group.

When Inherit Alpha is enabled, the alpha icon will appear struck through, and the layer gets clipped to layers under it.
How to Use Inherit Alpha
Let's start by learning how you can use Inherit Alpha in practice, and then we will take a look at the theory that will also help us understand other clipping methods.
1: create a new document in Krita with a white canvas (not a transparent canvas) and draw a few strokes across the background layer just so we can test the clipping mask is working.
2: create a new paint layer and name it "Clipped." Using a thick brush with red color, draw a circle on it. Enable its Inherit Alpha.
You should see that literally nothing happened.
That's because Inherit Alpha clips the layer to the opaque pixels under it. Since the Background layer is fully opaque, no clipping occurs.
3: create a layer called "Clipping Mask" under the "Clipped" layer and above the "Background" layer, then draw a large green circle on it.
You should see that literally nothing happened, again.
This is a bit confusing, isn't it? The Clipping Mask layer has lots of transparent pixels, and those transparent pixels are under Clipped, so why is Clipped not getting clipped to them?
In Krita, Inherit Alpha doesn't use the opaque pixels of the layer that is immediately under the Clipped layer, it uses the opaque pixels of the whole composite image under the layer.
If you are coming to Krita from Paint Tool SAI, FireAlpaca (Medibang), Clip Studio Paint, Photoshop, or Photopea, this can be extremely confusing, since in all these software, the way clipping masks work is that the layer just gets clipped to the layer or layer group immediately under it.
In Krita, we can achieve the same thing, but the way it's done is a bit different.
4: create a group layer and add both Clipping Mask and Clipped to the group layer. Clipped should be above Clipping Mask.
Tip: you can quickly create groups in Krita by selecting multiple layers and pressing the keyboard shortcut Ctrl+G.
Tip: you can quickly create a clipping group by selecting the layers that will serve as the clipping mask and pressing Ctrl+Shift+G, this will group them and create a new paint layer confusingly called "Mask Layer" at the top of new group with Inherit Alpha already enabled.
If you did this correctly, you should see that this time, finally, Clipped is clipped to Clipping Mask! But why did this work?
In Krita, each layer group is processed as a separate composite image by default. This means that the "bottom" of a layer group is like a fully transparent image until we place something in it. Since Inherit Alpha uses the opaque pixels of the composite image, when we place Clipped inside a layer group, it uses the opaque pixels of what is currently contained within that layer group.

Invisible Bottom Layer Problem
Since the very bottom of the group layer is processed as a fully transparent image, if we place the Clipped layer at the bottom of a group layer we'll be clipping it to something that has zero opaque pixels, and thus it will always become invisible.
If you are wondering why your layer suddenly disappeared, maybe that's the reason.
Inherit Alpha with Pass Through Mode
In Krita, a group layer in Pass Through mode is purely for organizational purposes and doesn't have a composite image of its own.
This means something with Inherit Alpha inside a Pass Through group works a bit different.
Instead of using composite image of the layers within the group, it simply behaves as if the group layer didn't exist. In other words, if you place Clipped at the bottom of a group layer with Pass Through enabled, it will simply get clipped to what is under the group itself, "passing through" the bottom.
Observation: interestingly, it seems that it's possible to enable Inherit Alpha on the group itself even when it's Pass Through.
Practical Drawing Techniques
Flat Color + Shading Technique
A typical way Inherit Alpha (and clipping masks in other software) is used by illustrators is to separate the color of parts of an illustrator from its shading.
In this technique, you use a flat brush, magic wand, or bucket fill tool to add "fills" to your illustration on a separate layer under the line art. Then you create a separate layer for "shading" that is clipped to the "fills." Because it's clipped, that means you don't risk accidentally drawing outside the areas you have already decided for the fills, even if you use a soft brush.
This technique tends to be favored by artists who use flat colors and cell shading. Many art tutorials follow the process of creating a separate layer for shading using the Multiply blend mode, and one for highlights using the Addition blend mode. It's not very useful for artists who do a lot of airbrushing and blending, and you can imagine that if you use a separate layer for each separate fill, you will end up with hundreds of layers on any moderately complex illustration.

Tip: in graphics software in general, there is an "Overlay" blend mode that combines both "Multiply" and "Screen" allowing you to do both lighting and shading in a single layer. "Screen" isn't the exactly same thing as "Addition," but it makes colors lighter too. In Krita, to do this you will use either Hard Light (uses Screen) or Hard Overlay (uses Divide), then colors lighter than grey will make the base color lighter, and colors darker than grey will make it darker.
For the record, Krita provides other methods to achieve this same technique. You can Lock Alpha to avoid changing the opacity of a layer and then change the blending mode of the brush itself, or you can add a Local Selection to a layer that allows you store a selected area and quickly re-select it if you need to use it again in the future. For example, instead of adding a separate layer just for coloring the eye of a character, you can just select the eye and save it as a Local Selection. Make sure to experiment with all of Krita's features to see what works best for your workflow.
Colored Line Art Technique
A second common technique for clipping masks is to create add color to your line art by adding a layer where you draw the colors that is clipped to the layer or layer group where your line art is stored.

Again, this removes the risk of accidentally altering the line art by drawing it with a brush.
One advantage of using a clipping mask here instead of just locking the alpha of the line art layer is that you can combine multiple layers to create your colored line art, and, in fact, you can even put a pattern in your line art if it's thick enough.
Texture Technique
You can also use a clipping mask to add a texture to your illustration. There are two ways to do this: either use a texture brush and draw over, or use one of the many Krita's built-in patterns.
Tip: if you use a pattern, one method that I wouldn't recommend is to use a fill layer to fill the entire canvas with the pattern and then clip it to the clipping mask. That's because in Krita, the fill layer literally creates a canvas-sized image every time even if you are clipping it to a small image, so it eats a lot of RAM. An alternative if all you want is a simple pattern is to use layer styles in Krita to add a pattern overlay instead because that is more RAM efficient. Unfortunately, not everything that you can do with fill layers you can do with this layer styles. For example, Simplex Noise isn't available as a layer style.

What is "Alpha"?
Now that we know how to use Inherit Alpha in practice, let's learn a bit about how it works in theory.
Krita, like most image editors and graphical programs, calls the "opacity" value of a color by the name of "alpha."
This means that a fully opaque color has 100% opacity, or 100% alpha, or 1.0 alpha, because 100% is the same thing as 100 divided by 100, which is 1.0. On the other hand, a fully transparent color (an invisible color), has 0% opacity, or 0% alpha, or 0.0 alpha. Finally, a half-transparent color has 50% opacity, or 50% alpha, or 0.5 alpha.
Usually, when you create a new image in an image editor, it uses 8 bits of memory to store the value of each color channel as an unsigned integer. In RGBA, we have 4 channels, (RGB, and alpha), so that's 32 bits per pixel total. With 8 bits, we can store unsigned integers ranging from 0 to 255. In some places in the graphical user interface of Krita you may see alpha displayed as a number from 0 to 255, because it's displayed in the [0..255] range. Divide this number by 255 and you get a [0..1] range, which is where 0% to 100% alpha comes from.
For example, 127 alpha in 8 bit is the same as 127/255 alpha[How to Read Math], which is around 0.498 alpha in [0..1] range, which is around 49.8% alpha.
Note: in 8 bit, it's not actually possible to get exactly 50% alpha, since 127 means 49.8% (~0.49803921568), and the next integer, 128, means 50.1% alpha (~0.50196078431).
How Inherit Alpha Works in Krita?
What "Inherit Alpha" does is not actually "inheriting" the alpha value as-is, but instead ignoring the alpha of the layer when calculating the final alpha of the image.
Normally, when a program composites layers, it blends the colors of the layers using the layer's blend mode. Each blend mode has a different function to combine RGBA values of two layers. Most commonly used blend modes define a different way to blend RGB values, but they combine the alpha of two layers the exact same way.
For example, the "Normal" blend mode uses the following function to calculate the final RGB:
finalRGB = topRGB * topAlpha + bottomRGB * (1 - topAlpha)
As you can see above, this blend function uses the alpha of the top layer to calculate how much its color contributes to the final color of the image. It's important to note that Inherit Alpha doesn't affect this at all.
Most commonly used blend modes use the following function to calculate the final alpha of the composite image:
finalAlpha = bottomAlpha + topAlpha * (1 - bottomAlpha)
What Inherit Alpha alpha does is replace ONLY the part that calculates the final alpha, changing it from the above, to what is below.
finalAlpha = bottomAlpha
In other words, the RGB is blended as normal, but the alpha of the top layer gets completely ignored.
For a practical example, let's say a top pixel is red with 80% opacity (1, 0, 0, 0.8), and the bottom pixel is blue with 20% opacity (0, 0, 1, 0.2). The final RGB would look like this:
r = 1.0 * 0.8 + 0.0 * (1 - 0.8) = 0.8
g = 0.0 * 0.8 + 0.0 * (1 - 0.8) = 0.0
b = 0.0 * 0.8 + 1.0 * (1 - 0.8) = 0.2
The normal way to calculate the final alpha would be this:
a = 0.2 + 0.8 * (1 - 0.2) = 0.84
What Inherit Alpha does is change the calculation above to this:
a = 0.2
Everything else is blended exactly the same, it's just the alpha that changes.
"Mix" Blend Modes
Most Krita users only know about the Inherit Alpha technique above, because, honestly, it's enough in most cases, but Krita also has some other methods we can use to clip layers to other layers that can be useful sometimes. The majority of these methods can be found by using changing the blend mode of a layer from "Normal" to one of the many modes inside "Mix" category.
"Destination In" Blend Mode
The "Destination In" blend mode is arguably the actual, true clipping mask blend mode.
What the "Destination In" blend mode does is clip the layers below to the alpha of this layer, and, on top of that, it does NOT blend the RGB colors. This means you can't actually see the colors of a layer in "Destination In" blend mode, because those colors aren't used at all in the blending function. Only the alpha value is used.
One great way to use this is with a vector layer. If you create a vector layer and draw vector circle or a vector square in it, then it doesn't matter what color you make it, you will have clipped your entire artwork to this single circle or square shape. If you rotate the square, it's a diamond shape. You wouldn't be able to do this with Inherit Alpha or with clipping masks in other software normally, since in that case the shape would get rendered as well.

If you have used Inkscape before. Inherit Alpha is like a Set Clip Group, while Destination In is like Set Clip.
Usually, this blend mode isn't very useful for illustrators since they want the layers they are drawing to actually appear on the canvas, and they just want to clip an effect to it. However, one way to have the best of the two worlds is to use a clone layer. With a clone layer you can have a drawing in one place of the document that works as a clipping mask somewhere else entirely on the layer stack.
In general this blend mode is most useful if you want to create transparent graphics, since it just masks without drawing an opaque background.
"Erase" Blend Mode
The Erase blend mode is similar to the Destination In blend mode in that the colors are discard, but what is different is that it does the opposite of what Destination In does.
The way the Erase blend mode works is that if a pixel is opaque in this layer, it becomes fully transparent in the composite image, as if you had a huge layer-shaped eraser brush that is applied only once.
This means that you can use this layer to open "holes" in layers under it by drawing shapes, and, most interestingly, you now have a non-destructive eraser in your drawing program.
For example, let's say you are working in game development and you need to draw a sprite of a stickman. The stickman doesn't have fills. It's only the strokes. You need two variations: the normal stickman, and the stickman wearing a hat. Although this sounds like a simple task, there is one problem: when you draw the hat on top of the stickman's head, it must hide the top of the head, but the "fill" of the hat must be transparent. It must look like you drew it that way from the start instead of just placing a hat layer on top of a stickman layer.
Usually this would require you to draw two stickman sprites separate, or extract the top of the head of the stickman to a separate layer so you can make it visible or invisible depending on which variation you want to export, but now that you have an Erase blend mode, you can simply draw on a layer the area you want erased and it's going to get erased.
As we already know from how Inherit Alpha works, Krita processes group layers as entirely separate images unless Pass Through is enabled. This means that a layer with Erase blend mode (or Destination In blend mode) that is contained inside of a group layer can't affect the layers that are outside its group by default, but it can affect them if the group layer is in Pass Through mode. This means we could place our non-destructive eraser at the bottom of a group layer and make it display and hide the top of the head with just one click on the eye icon to toggle the group's visibility.

"Alpha Darken" Blend Mode
The "Alpha Darken" blend mode works in a very weird way in Krita. It doesn't take in consideration the alpha of the pixels at all when used as a layer blend mode. Instead, it only considers the Opacity property of the whole layer. It seems this mode is used internally in Krita for some brushes, but since it's alpha-related it's worth noting it here as well.
What the Alpha Darken blend mode does is it takes the most opaque opacity of both layers instead of adding them together.
Normally, if you have two layers with 50% opacity, the final opacity is:
opacity = 0.5 + 0.5 * (1 - 0.5) = 0.75
In other words, 75% opacity. As you would expect, if you add two layers that are semi-transparent together, the result is something that is more opaque than both layers.
However, if the blend mode is Alpha Darken, then the result is never more opaque than both layers. It's always the most opaque value.
opacity = max(0.5, 0.5)
Since both layers in this example have 50% opacity, the final opacity will be 50%. If one was 20% and the other 80%, the final opacity would be 80%.
This blend mode is only useful if you have a layer with less than 100% Opacity, otherwise Alpha Darken won't do anything.
"Behind" Blend Mode
The "Behind" blend mode is a bit useless, to be honest, but I guess it's in the same category.
What the "Behind" blend mode does is change the blending function so that top and bottom are switched. It works as if the layer is at the bottom of the layer stack instead of at the top of it.
The reason this is a bit useless is because it just does the same thing as manually moving the layer to the bottom of the stack, so it isn't doing anything special at all.
"Destination Atop" Blend Mode
The Destination Atop blend mode sounds similar to Destination In, but also a bit useless, because it's actually just Inherit Alpha in reverse, just like "Behind" is just "Normal" in reverse.
What the Destination Atop blend mode does is renders only this layer, and this layer is rendered normally, except that if there are pixels under it, those pixels are drawn on top of it instead. This means that areas that are transparent in this layer remain transparent, areas that are opaque become opaque, and areas that are opaque in this layer and the layer under it, use the color of the layers under it instead of the colors of this layer.
Once again, the reason why this is a bit useless is that you could simply just move the layer to the bottom instead of the stack instead and use Inherit Alpha on the other layer.
There are some cases where this may be useful, though, because to use Inherit Alpha you will probably need to create more layer groups, and this blend mode allows you to skip that doing that in some cases. For example, let's say you have an illustration that you want to clip to a red circle. Instead of putting the entire illustration in a layer group, then inheriting alpha, then placing a circle under it, then placing everything in a layer group, you can simply put the circle on top of everything and use Destination Atop to make the circle appear behind the illustration and make the illustration clipped to the circle.
Complex Clipping Masks
In this section, we will learn how to create more complex clipping masks using Krita's features.
Manual Transparency Mask from Layer Group Opacity
One simple trick that you may not know about is that if you need a quick destructive clipping mask, you can create a transparency mask out of a layer or layer group's alpha, and in many cases this will be the simplest method to do complex masking.
When you add a transparency mask to a layer, the initial mask is created out of the current selection. You may think that the current selection, the area of pixels selected, is a yes-or-no thing where a pixel is either selected or not selected, but it's actually a 0% to 100% thing just like alpha, and you can even display and directly edit the global selection mask if you want to.
This means that we can create a transparency mask out of a layer's alpha if we manage to turn copy and paste layer's alpha to the global selection mask before creating the transparency mask. Fortunately, Krita provides a way to do this with just one command.
Select the layer or layer group that will serve as the source of your clipping mask, click on Select -> Select Opaque -> Select Opaque (Replace) on the menubar to select all of its opaque pixels, and then you just need to select the layer that you want to apply the clipping mask to, and add a transparency mask to it.
Grey Scale Image to Clipping Mask
One unfortunate thing about Krita is that while transparency masks can be edited with what appears to be grey scale colors, it doesn't seem possible at first glance to simply use a grey scale image as a clipping mask, like you can in Inkscape. A lot of clipping masks, patterns, and even shapes may be distributed as grey scale images, so not being able to do this rather limits the usefulness of Krita. Fortunately, there is a way to do this. We just need to convert lightness to alpha.
To do this, add a filter mask or filter layer to your grey scale image, and select the Cross-channel color adjustment filter.
Select Alpha as the Channel, as Lightness as the Driver channel.
Now drag the left side of the curve to the bottom-left corner, so that 0% lightness means -100% alpha. This will turn black into transparent. If you want to turn white into transparent instead, you do the exact same thing with the right side instead.
Now you can use your grey scale image as a clipping mask in Krita with any of the methods we have already learned, such as Inherit Alpha or Destination In.

Warning: our cross channel color adjustment merely changed the alpha of the image, it hasn't changed the lightness. This means that semi-transparent pixels are neither black or white, they are grey and semi-transparent. This can create unwanted "border" effects if you don't fully paint over the clipping mask. To get rid of these, the easiest method is to use layer styles to add a fully opaque, Normal blend mode white color or black color, or whatever color you wish, to the grey scale image AFTER applying the filter, or the cross channel color adjustment will operate on a single color rather than a grey scale image. It's worth noting that filter masks are applied to layers before layer styles in Krita, so if you use a filter mask you add the style to the layer, and if you use a filter layer you add the style to the filter layer.
Red Monochrome to Clipping Mask
Using the same method as above, we can turn red, green, or blue into alpha by changing the Driver channel from Lightness to Red, Green, or Blue. This is probably not very useful unless you are working with normal maps.
Any Hue to Clipping Mask
We can turn any color into a clipping mask by using a filter mask with the HSV/HSL Adjustment filter to make that color red, and then we use the red monochrome to clipping mask technique above to turn red into alpha, and then we use the result as a clipping mask.
Tip: if you're working with photography or anything based on how light actually works in physics, you will want to use Hue/Saturation/Luma as that takes into account the differences in brightness across hues when hue shifting. Otherwise, e.g. if you are working with an artificial images like a normal map, Hue/Saturation/Value should work fine.

Using the Outer Stroke as a Clipping Mask
We can clip a layer to the outer stroke of another layer by cloning the original layer and adding a stroke layer style effect to it, then using a second clone to Erase the original layer's contents from the composite image. This will have extracted the stroke effect alone, which we can then use as a clipping mask.
Using the Edges of a Layer as a Clipping Mask
We can clip a layer to only the edges of another layer by cloning that layer twice and adding a stroke layer style effect to the upper clone that is set to be an inner stroke with 0% opacity. This will remove X pixels from the edges of the clone. Then we can use the upper clone as an eraser to remove the center part from the lower clone. We can then use that as a clipping mask that masks only the edges of the original layer.
In this case, you can make it even better by using Gaussian blur filter mask to create a fading effect on the edges.
Video
Krita Project Files
If you aren't sure how to create some of the effects described in this article, you may want to: