Opacity changes bar color #97

Closed
opened 2026-05-24 03:19:21 +02:00 by AramJonghu · 1 comment
Collaborator

Bar color seems to be changing drastically when changing opacity levels or just on/off. Here a couple examples.

image.png
image.png
image.png

This is on a preset colorscheme.

Bar color seems to be changing drastically when changing opacity levels or just on/off. Here a couple examples. ![image.png](/attachments/16ef3733-c5a2-4e28-9495-311669988135) ![image.png](/attachments/25f814ff-2f4c-423f-914c-2b601b95a8c8) ![image.png](/attachments/7cf30fca-dc5d-42dd-a3e1-5c25774bfb24) This is on a preset colorscheme.
AramJonghu added the bug label 2026-05-24 03:19:21 +02:00
zach was assigned by AramJonghu 2026-05-24 03:19:21 +02:00
AramJonghu added this to the Zshell board project 2026-05-24 03:19:21 +02:00
Owner

Pretty sure linked lines is the culprit. I'd imagine my extensive use of the layer() method with a layer value of > 0 is contributing to this. I'll see if I can fix it.

function alterColor(c: color, a: real, layer: int): color {
const luminance = getLuminance(c);
const offset = (!light || layer == 1 ? 1 : -layer / 2) * (light ? 0.2 : 0.3) * (1 - transparency.base) * (1 + wallLuminance * (light ? (layer == 1 ? 3 : 1) : 2.5));
const scale = (luminance + offset) / luminance;
const r = Math.max(0, Math.min(1, c.r * scale));
const g = Math.max(0, Math.min(1, c.g * scale));
const b = Math.max(0, Math.min(1, c.b * scale));
return Qt.rgba(r, g, b, a);
}

Pretty sure linked lines is the culprit. I'd imagine my extensive use of the `layer()` method with a `layer` value of `> 0` is contributing to this. I'll see if I can fix it. https://git.zach-dev.cc/zach/z-bar-qt/src/commit/ad57764636b486cc867644607ad28808f7fa378a/Config/DynamicColors.qml#L32-L42
AramJonghu moved this to Review in Zshell board on 2026-05-24 18:52:28 +02:00
AramJonghu moved this to Done in Zshell board on 2026-05-25 22:23:41 +02:00
Sign in to join this conversation.