quickshell: blend status colours toward the theme accent
Fixed hues stayed legible but read as pasted on. Mix each 25% toward base0D so they land in the wallpaper's family: err #e0525f -> #b86872, ok #68c17c -> #5ebb88. statusHarmony is the one knob. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
e2c413d997
commit
6f32d56c5b
1 changed files with 20 additions and 10 deletions
|
|
@ -282,16 +282,26 @@ in
|
||||||
// The one themed accent: active, focused, selected, filled.
|
// The one themed accent: active, focused, selected, filled.
|
||||||
readonly property color base0D: "#${c.base0D}"
|
readonly property color base0D: "#${c.base0D}"
|
||||||
|
|
||||||
// ── Status colours, deliberately NOT wallpaper-derived.
|
// ── Status colours: fixed hues, pulled toward the theme.
|
||||||
// stylix's base08-base0F all collapse to near-identical values
|
// Sourcing these from stylix doesn't work — base08-base0F all
|
||||||
// on a monochrome wallpaper, which leaves "battery critical"
|
// collapse to near-identical values on a monochrome wallpaper,
|
||||||
// and "battery low" the same colour. Status has to stay legible
|
// which leaves "battery critical" and "battery low" the same
|
||||||
// whatever is on the desktop, so these are fixed.
|
// colour. So the HUE is fixed and only the hue is: each one is
|
||||||
readonly property color err: "#e0525f" // critical: temp ≥85, batt ≤15, auth failed
|
// then mixed toward base0D, which keeps red reading as red
|
||||||
readonly property color warn: "#e0a44b" // caution: temp ≥70, batt ≤30
|
// while landing it in the wallpaper's family instead of looking
|
||||||
readonly property color ok: "#68c17c" // connected / active / net down
|
// pasted on. Blending toward base0D and not toward the card
|
||||||
readonly property color info: "#5aa6e0" // memory
|
// keeps luminance roughly intact, so these stay legible as text
|
||||||
readonly property color alt: "#b98ce0" // net up
|
// on cardBg — mixing into the background would sink them.
|
||||||
|
readonly property real statusHarmony: 0.25 // 0 = pure hue, 1 = pure accent
|
||||||
|
function harmonised(hex) {
|
||||||
|
let h = Qt.color(hex);
|
||||||
|
return Qt.tint(base0D, Qt.rgba(h.r, h.g, h.b, 1 - statusHarmony));
|
||||||
|
}
|
||||||
|
readonly property color err: harmonised("#e0525f") // critical: temp ≥85, batt ≤15, auth failed
|
||||||
|
readonly property color warn: harmonised("#e0a44b") // caution: temp ≥70, batt ≤30
|
||||||
|
readonly property color ok: harmonised("#68c17c") // connected / active / net down
|
||||||
|
readonly property color info: harmonised("#5aa6e0") // memory
|
||||||
|
readonly property color alt: harmonised("#b98ce0") // net up
|
||||||
|
|
||||||
readonly property color barBg: Qt.rgba(base00.r, base00.g, base00.b, 0.70)
|
readonly property color barBg: Qt.rgba(base00.r, base00.g, base00.b, 0.70)
|
||||||
// Card surfaces are translucent so the compositor's bar-layer
|
// Card surfaces are translucent so the compositor's bar-layer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue