ink ladder: base03/base04 derive from base05, shared with hyprland

base03/base04/base05 were three independent slots off the wallpaper, not
one ink at three strengths. On wallhaven-k8dqr6 the raw ladder is red,
blue and cream; on 5y39p9 base03 is a saturated gold against pale cream.
That is why muted labels read as a second accent and why the shell frame
never quite matched the window border beside it.

base04 and base03 are now base05 mixed toward base00. The two factors and
the mix live in settings/ui.nix and are used by all three consumers:
Theme.qml, theming.nix's hypr.lua (applied at runtime) and hyprland.nix's
build-time fallback. Same trick base01/base02 already used for surfaces.

Verified on 5y39p9: hypr.lua now emits aca888 / 727761 from base05 f1e2b6
against base00 0a1f1c, matching what inkStep computes in the shell.
This commit is contained in:
rope 2026-08-31 13:03:45 +01:00
parent 1dc6886b56
commit b5372d46f3
4 changed files with 78 additions and 15 deletions

View file

@ -101,6 +101,13 @@ in
c = config.lib.stylix.colors;
rgb = hex: "rgb(${hex})";
rgba = hex: a: "rgba(${hex}${a})";
# Build-time fallback for the border colours, until theme-apply first
# runs and hyprctl-evals the theme's own hypr.lua. Same two mixes as
# settings/theming.nix and quickshell's Theme.qml — see ui.nix. Not
# c.base04/c.base03: those are independent slots off the wallpaper and
# land in unrelated hues from the ink the shell frame is drawn in.
ink4 = ui.mixHex c.base05 c.base00 ui.inkMuted;
ink3 = ui.mixHex c.base05 c.base00 ui.inkFaint;
in {
# Stylix's Hyprland target injects settings.{general,decoration,group,misc}
# as top-level keys, which render as hl.general()/hl.decoration()/… in Lua
@ -149,8 +156,8 @@ in
# any palette. NOT base0D — a wallpaper-derived scheme can hand
# base0D and base03 the same value (this one does: both 3fa8ab),
# which left active and inactive windows indistinguishable.
"col.active_border" = rgb c.base04;
"col.inactive_border" = rgb c.base03;
"col.active_border" = rgb ink4;
"col.inactive_border" = rgb ink3;
};
decoration = {
@ -169,13 +176,13 @@ in
group = {
# Same base04/base03 ramp as general.col.* above.
"col.border_active" = rgb c.base04;
"col.border_inactive" = rgb c.base03;
"col.border_active" = rgb ink4;
"col.border_inactive" = rgb ink3;
"col.border_locked_active" = rgb c.base05;
groupbar = {
text_color = rgb c.base05;
"col.active" = rgb c.base04;
"col.inactive" = rgb c.base03;
"col.active" = rgb ink4;
"col.inactive" = rgb ink3;
};
};