diff --git a/app/utils/to-electron-background-color.js b/app/utils/to-electron-background-color.js index 4203d3e8..f086b3ca 100644 --- a/app/utils/to-electron-background-color.js +++ b/app/utils/to-electron-background-color.js @@ -8,6 +8,8 @@ module.exports = bgColor => { if (color.alpha() === 1) { return color.hexString(); } - // (╯°□°)╯︵ ┻━┻ - return '#' + Math.floor(color.alpha() * 100) + color.hexString().substr(1); + + // http://stackoverflow.com/a/11019879/1202488 + const alphaHex = Math.round(color.alpha() * 255).toString(16); + return '#' + alphaHex + color.hexString().substr(1); };