diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 83aabb236..9cc8d6f1b 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -11607,14 +11607,14 @@ matrix: function(foreground, background) { var bg, bgHex, fg, fgHex; - fgHex = Style.colorToHex(foreground); + fgHex = Style.colorToHex(foreground) || "ffffff"; fg = { r: parseInt(fgHex.substr(0, 2), 16) / 255, g: parseInt(fgHex.substr(2, 2), 16) / 255, b: parseInt(fgHex.substr(4, 2), 16) / 255 }; if (background) { - bgHex = Style.colorToHex(background); + bgHex = Style.colorToHex(background) || "000000"; bg = { r: parseInt(bgHex.substr(0, 2), 16) / 255, g: parseInt(bgHex.substr(2, 2), 16) / 255, diff --git a/builds/crx/script.js b/builds/crx/script.js index 0814a0d56..4977efd02 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -11592,14 +11592,14 @@ matrix: function(foreground, background) { var bg, bgHex, fg, fgHex; - fgHex = Style.colorToHex(foreground); + fgHex = Style.colorToHex(foreground) || "ffffff"; fg = { r: parseInt(fgHex.substr(0, 2), 16) / 255, g: parseInt(fgHex.substr(2, 2), 16) / 255, b: parseInt(fgHex.substr(4, 2), 16) / 255 }; if (background) { - bgHex = Style.colorToHex(background); + bgHex = Style.colorToHex(background) || "000000"; bg = { r: parseInt(bgHex.substr(0, 2), 16) / 255, g: parseInt(bgHex.substr(2, 2), 16) / 255, diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index 8089fe826..c00ff4825 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -120,7 +120,7 @@ Style = return matrix: (foreground, background) -> - fgHex = Style.colorToHex foreground + fgHex = Style.colorToHex(foreground) or "ffffff" fg = { r: parseInt(fgHex.substr(0, 2), 16) / 255 @@ -129,7 +129,7 @@ Style = } if background - bgHex = Style.colorToHex background + bgHex = Style.colorToHex(background) or "000000" bg = { r: parseInt(bgHex.substr(0, 2), 16) / 255