quickshell-toki-night/util/Color.qml

15 lines
360 B
QML

pragma Singleton
import Quickshell
import QtQuick
Singleton {
function mute(color: color, s: real, v: real): color {
if (!s) s = 1.2;
if (!v) v = 1.2;
const hue = color.hsvHue;
const saturation = color.hsvSaturation;
const value = color.hsvValue;
return Qt.hsva(hue, saturation * s, value / v, 1);
}
}