From 8e5ffd036fa1b803cb5a71c023f9af0937766d16 Mon Sep 17 00:00:00 2001 From: eight Date: Tue, 12 Sep 2017 20:29:09 +0800 Subject: [PATCH] Fix: use rgb() when alpha === 1 --- js/usercss.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/usercss.js b/js/usercss.js index 1cf53aa2..8f6ab259 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -66,6 +66,9 @@ var usercss = (function () { } function format({r, g, b, a = 1}) { + if (a === 1) { + return `rgb(${r}, ${g}, ${b})`; + } return `rgba(${r}, ${g}, ${b}, ${a})`; }