set_region(region: object<wl_region>)
Argument
Type
Description
regionobject<wl_region>allow null
set_contrast(contrast: fixed)
Argument
Type
Description
contrastfixed
set_intensity(intensity: fixed)
Argument
Type
Description
intensityfixed
set_saturation(saturation: fixed)
Argument
Type
Description
saturationfixed
release()
release the contrast object
set_frost(red: int, green: int, blue: int, alpha: int)
Argument
Type
Description
redint
greenint
blueint
alphaint
opt into frost effect w/ given colour

enables 'frost' variant of contrast effect.

'frost' is an enhanced version of the contrast effect that uses different colour arithmetic to get backgrounds simultaneously higher in contrast and (apparent) transparency.

r, g, b, a are channels from 0-255, indicating a colour to use in contrast calculation. should be based off of the "main" background colour of the surface.

unset_frost()
opts out of frost effect

Compositor Support

Mutter
Mutter
46
KWin
KWin
6.2
Sway
Sway
1.9
COSMIC
COSMIC
1.0.0
Hyprland
Hyprland
0.42.0
niri
0.1.8
Weston
Weston
13
Mir
Mir
2.18
GameScope
GameScope
3.15.14
Jay
1.7.0
org_kde_kwin_contrast_manager
x
2
x
x
x
x
x
x
x
x

SPDX-FileCopyrightText: 2015 Martin Gräßlin SPDX-FileCopyrightText: 2015 Marco Martin

SPDX-License-Identifier: LGPL-2.1-or-later