From 3962b96ad69f830caaddc45e5c7a9e0c09a7b1f0 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 9 Nov 2019 11:53:24 -0500 Subject: * --- benchmark/scripts/benchmark.js | 47 ------------------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 benchmark/scripts/benchmark.js (limited to 'benchmark/scripts/benchmark.js') diff --git a/benchmark/scripts/benchmark.js b/benchmark/scripts/benchmark.js deleted file mode 100644 index 14246b9..0000000 --- a/benchmark/scripts/benchmark.js +++ /dev/null @@ -1,47 +0,0 @@ -function Benchmark() -{ - this.matches = function() - { - var a = [{id:`b_inv:f_inv`,fc:theme.active.f_inv,bc:theme.active.b_inv}] - for(let fid in theme.active){ - if(fid.substr(0,1) != "f" || fid.indexOf("_inv") > -1){ continue; } - let fc = theme.active[fid] - for(let bid in theme.active){ - if(bid.substr(0,1) != "b" || bid.indexOf("_inv") > -1){ continue; } - let bc = theme.active[bid] - a.push({id:`${bid}:${fid}`,fc:fc,bc:bc}) - } - } - return a; - } - - this.refresh = function() - { - let el = document.getElementById("print") - let html = "" - let count = 0 - let matches = bench.matches(); - - for(let id in matches){ - html += bench.log(matches[id].id,matches[id].fc,matches[id].bc) - } - - el.innerHTML = html - } - - this.log = function(id,fc,bc) - { - let html = "" - - let rating = new Color(fc).contrast(new Color(bc)); - - if(rating == 1){ - html += `Overlap: ${id} ${bc}\n` - } - else if(rating < 1.5){ - html += `Low contrast(${rating.toFixed(2)}): ${id} ${bc}\n` - } - - return html - } -} -- cgit v1.2.3