Closes #910: make transparency of message bubbles overridable via CSS (#911)

* Closes #910: make transparency of message bubbles overridable via CSS

* Fix CSS variable declaration
This commit is contained in:
Aral Balkan
2021-04-11 22:08:06 +01:00
committed by GitHub
parent a4309fd899
commit 2409cab5b6
2 changed files with 7 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ export function messageBubbleColorForString(str) {
// Tweak these to adjust the result of the color
const saturation = 25;
const lightness = 45;
const alpha = 0.3;
const alpha = 'var(--message-background-alpha)';
const hue = parseInt(Math.abs(hash), 16) % 360;
return `hsla(${hue}, ${saturation}%, ${lightness}%, ${alpha})`;