From 97f07e3af220fd3aacf93efbbc97f38629ae2dfc Mon Sep 17 00:00:00 2001 From: jackhe16 Date: Thu, 20 Oct 2022 22:19:05 +0800 Subject: [PATCH] change #rrggbbaa hex color notation to rgba --- src/html5-qrcode-scanner.ts | 6 +++--- src/html5-qrcode.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/html5-qrcode-scanner.ts b/src/html5-qrcode-scanner.ts index 72fb231..154d16f 100644 --- a/src/html5-qrcode-scanner.ts +++ b/src/html5-qrcode-scanner.ts @@ -912,16 +912,16 @@ export class Html5QrcodeScanner { switch (scannerStatus) { case Html5QrcodeScannerStatus.STATUS_SUCCESS: - messageDiv.style.background = "#6aaf5042"; + messageDiv.style.background = "rgba(106, 175, 80, 0.26)"; messageDiv.style.color = "#477735"; break; case Html5QrcodeScannerStatus.STATUS_WARNING: - messageDiv.style.background = "#cb243124"; + messageDiv.style.background = "rgba(203, 36, 49, 0.14)"; messageDiv.style.color = "#cb2431"; break; case Html5QrcodeScannerStatus.STATUS_DEFAULT: default: - messageDiv.style.background = "#00000000"; + messageDiv.style.background = "rgba(0, 0, 0, 0)"; messageDiv.style.color = "rgb(17, 17, 17)"; break; } diff --git a/src/html5-qrcode.ts b/src/html5-qrcode.ts index d9f6ff6..0e32371 100644 --- a/src/html5-qrcode.ts +++ b/src/html5-qrcode.ts @@ -1535,13 +1535,13 @@ export class Html5Qrcode { const topBottomBorderSize = (height - qrboxSize.height) / 2; shadingElement.style.borderLeft - = `${rightLeftBorderSize}px solid #0000007a`; + = `${rightLeftBorderSize}px solid rgba(0, 0, 0, 0.48)`; shadingElement.style.borderRight - = `${rightLeftBorderSize}px solid #0000007a`; + = `${rightLeftBorderSize}px solid rgba(0, 0, 0, 0.48)`; shadingElement.style.borderTop - = `${topBottomBorderSize}px solid #0000007a`; + = `${topBottomBorderSize}px solid rgba(0, 0, 0, 0.48)`; shadingElement.style.borderBottom - = `${topBottomBorderSize}px solid #0000007a`; + = `${topBottomBorderSize}px solid rgba(0, 0, 0, 0.48)`; shadingElement.style.boxSizing = "border-box"; shadingElement.style.top = "0px"; shadingElement.style.bottom = "0px";