 Hi, today I'm here to talk about blur in KDE. Now what we usually call blur is actually a more complex effect structure. So there is the applet which is transparent. Underneath it there's the blur effect, the actual blur effect. Then there's the contrast effect and then there's your wallpaper. So let's go through those four phases. So first one there's the applet and the behavior and appearance of the applet is defined in the plasma theme. I've done lots of videos on the plasma theme so I'm assuming you know what that one is. Then there is the blur effect. And the blur effect has some very nice features. First of all it's very fast. It uses a dual colors algorithm, if I remember correctly. It was introduced this algorithm in 5.13 I think. And it allowed us to use very high radius for the blur without compromising neither CPU time nor you know the appearance of the result. And secondly the blur effect is also very color accurate because there was a post in error slash KDE that said that when transitioning from colors there's a common mistake that produces some black bars in the middle. And we actually fixed that so it is very color accurate. So those are the features of the blur algorithm which is super nice. But it's not just a matter of the blur because if there's just blur then you're going to get a very bad contrast ratio for what's over it because you will have black text on black background if you have a dark wallpaper. So what we decided to do is to add a contrast effect. So the contrast effect works like this. It's a normal let's say normal image editing tool. So you have actually three options which are contrast intensity which is actually luminosity and saturation. And you can change the three values independently. Now the contrast is something that takes dark colors and make them lighter. Takes light color of course and make them lighter as well. The saturation brings the color more to life like if there's something that's kind of red it makes it super red. And then finally the intensity luminosity again makes everything a bit lighter but does not actually alter dark wallpapers or pure black. Contrast as the first effect is what we use to take the black and make it a bit lighter. So if you have a completely black wallpaper for any reason you can still get a readable text over it because it's not going to get as complete black even at the outlet level. It's going to get lighter. And then of course since we're at it we also use the saturation effect to pump up the saturation and makes color more visible. That's why many people disabling the contrast effect say that they do not longer see transparency. Well transparency is still there. You still see it. But the problem is that the color behind the blur is suddenly much more saturated so it's not as noticeable. If you think about it, super red is very easy with a little bit of tint to see it but a red ish that's close to white not as much. So that is why contrast effect seem to influence blur when it actually doesn't at all. Then there's your wallpaper. And the hard part of this whole stack is that we have to design it regardless of the wallpaper you're going to use because if we had to ship like five wallpapers and that's it no more wallpapers then it would be super easy with just hard-coded values but there are some crazy, busy and some very minimalistic wallpapers and we have to design for both of them. And it's actually really hard because first of all you have dark wallpapers and those need to be lightened up. Then you also have wallpapers with colors that are either very light or very dark and those need to be saturated. But sometimes you also get some wallpapers like the one using C which do have some color, sometimes even pretty strong and when you actually saturate those wallpapers you oversaturate them and the color resulting is not very natural. So that's the issue that we have at the contrast effect level to adapt to your wallpaper. The blur is not really involved in all of this. It's just making it look like it's frosted glass and that's it. So what we're trying to do is design something that's better than contrast effect that's something we're experimenting with. Now that could lead to some new effect or maybe we just need to use the contrast effect better. And that's actually pretty much it for how it works so you now should have a clear idea of the stack. Wallpaper contrast effect that takes the redish yellowish color and actually pump up their saturation. Then the contrast actual effect that lightens up everything together with luminosity. We cannot use luminosity too much otherwise we're going to end up with very light colors even when there shouldn't be there. And then you actually have the blur which is again very fast and very color accurate so I often see comments saying we should improve the blur effect. Now actually the blur effect is I think perfect. The problem is above and underneath it. And then there's the applet which is actually what decides the amount of transparency for the whole theme. Now technically we could set the applet to 100% transparency and it wouldn't look like it is because the contrast effect already provides a bit of luminosity and contrast meaning that it will have some white overlay. It will seem as if there's a white overlay. So if you disable both the transparency of the applet and the contrast effect then it's just blur. But the contrast effect already provides some sort of overlay and of course we use that to allow us more transparency at the applet level. Now the issue is that if you have a light theme or a dark theme well things change because the contrast effect should adapt to the shoe because lightness is something that you really need if you're using a light theme and something that you don't need at all if you're using a dark one. Kind of. So what we are actually doing in theory is to adapt the contrast effect to the luminosity of the color skin. However we are not actually doing that because it doesn't fit our use case well enough because if you actually see what colors are generated what intensity values are generated from the color scheme they are not good enough. So we currently have just one intensity effect for both light theme and dark theme. This is why we cannot act on the breeze dark theme to make it darker in regard to transparency because we need to use a value that works both for breeze dark and breeze light and that's something else that we would like to fix. So to summarize it up if you're a plasma theme creator then the main takeaway is that you should try out the contrast effect especially if your theme is not 100% transparent. If it's 70% to 80% transparent then you might be interested in it especially the saturation value. Try turning it on with intensity 1, contrast 1 which means it changes nothing and then saturation 2 which pumps up the saturation already quite a lot. If you're a normal user so not a plasma theme creator the main takeaway is please do not disable the contrast effect because it has happened that the contrast effect has caused some bugs and it still causes some. Still the contrast effect is what allows us to design the blur effect to work for a wide range of wallpapers so please don't disable it because otherwise your applet might look wrong on certain wallpapers. If you try it and see that it works then just go for it but if you want an opaque panel do not disable contrast effect that's automatic, just right click on the panel go to the adaptive transparency section and select opaque.