Skip to content

feat: frost mode for contrast shaders

Jan Blackquill requested to merge work/janb/frost into master

This implements an improved contrast effect that uses some colour arithmetic shenanigans that provides something that's simultaneously more opaque and more transparent, much in the same way Apple products can be impossibly shiny without the screens reflecting your entire workspace at you.

In more details, this uses colour dodge on the area behind a window w/ contrast rather than the usual alpha blend. This colour blending technique results in a sort of balance between the following rules:

  • ligher background -> weaker effect and darker background -> stronger effect
  • lighter foreground -> stronger effect and darker background -> weaker effect

This allows more "intelligent" selection on how to adjust colours, resulting in an effect that simultaneously has better text contrast while allowing the background to seem more transparent to appeal to our graphic designers that obsess over blur + transparency.

Marked as draft because needs client<->server glue code all over the place for X11 and Wayland that I haven't implemented + integration into Plasma & other places that might use the contrast effect. For now, hardcoded to always use frost effect with #121212 at 40% opacity.

Edited by Jan Blackquill

Merge request reports