Fix: use rgb() when alpha === 1

This commit is contained in:
eight 2017-09-12 20:29:09 +08:00
parent a3f26d89b8
commit 8e5ffd036f

View File

@ -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})`;
}