diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2017-07-22 01:59:19 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-17 16:32:49 +0100 |
commit | 6f5c57ae74045228c2cbe4b797fe228f03274e6c (patch) | |
tree | 72f882929fa06be8b77575894e5f8e991e3c76f1 /browser | |
parent | 4ccbe3620eb1cd354ce66f51730d7baf9b1a5f81 (diff) | |
download | UXP-6f5c57ae74045228c2cbe4b797fe228f03274e6c.tar UXP-6f5c57ae74045228c2cbe4b797fe228f03274e6c.tar.gz UXP-6f5c57ae74045228c2cbe4b797fe228f03274e6c.tar.lz UXP-6f5c57ae74045228c2cbe4b797fe228f03274e6c.tar.xz UXP-6f5c57ae74045228c2cbe4b797fe228f03274e6c.zip |
Align ToolbarIconColor luminance computation with UWP guideline as well to make it consistent with the rest of the browser.
Diffstat (limited to 'browser')
-rwxr-xr-x | browser/base/content/browser.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index bbfef0049..a8aff1bd7 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -8144,12 +8144,12 @@ var ToolbarIconColor = { let luminances = new Map; for (let toolbar of document.querySelectorAll(toolbarSelector)) { let [r, g, b] = parseRGB(getComputedStyle(toolbar).color); - let luminance = 0.2125 * r + 0.7154 * g + 0.0721 * b; + let luminance = (2 * r + 5 * g + b) / 8; luminances.set(toolbar, luminance); } for (let [toolbar, luminance] of luminances) { - if (luminance <= 110) + if (luminance <= 128) toolbar.removeAttribute("brighttext"); else toolbar.setAttribute("brighttext", "true"); |