mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Align ToolbarIconColor luminance computation with UWP guideline as well to make it consistent with the rest of the browser.
This commit is contained in:
parent
2ce8b3b74e
commit
9ee75644b9
1 changed files with 2 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue