diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-21 13:57:22 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-21 13:57:22 -0500 |
| commit | b56ca508247184eadc63f89e23191f6967f309d3 (patch) | |
| tree | 1e0e0a7b1a98254071586801c7790898be490bc0 /src/formats.ts | |
| parent | 6fc3620be4a4ec0daa978d17e8b88479318d1306 (diff) | |
| download | ao-coverage-b56ca508247184eadc63f89e23191f6967f309d3.tar.gz ao-coverage-b56ca508247184eadc63f89e23191f6967f309d3.tar.bz2 ao-coverage-b56ca508247184eadc63f89e23191f6967f309d3.zip | |
#4 Lower brightness of generated report badges
Diffstat (limited to 'src/formats.ts')
| -rw-r--r-- | src/formats.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/formats.ts b/src/formats.ts index 8de55b1..d22ea3e 100644 --- a/src/formats.ts +++ b/src/formats.ts @@ -30,16 +30,16 @@ export const defaultColorMatches = ( ): string => { const gradient = coverage >= style.stage1 - ? 15 + ? 76 : coverage >= style.stage2 - ? Math.floor( - ((style.stage1 - coverage) / (style.stage1 - style.stage2)) * 15 + ? Math.floor( + ((style.stage1 - coverage) / (style.stage1 - style.stage2)) * 10 ) * - 16 + - 15 - : 240 + Math.floor(coverage / (style.stage2 / 15)); + 16 + + 76 + : 225 + Math.floor(coverage / (style.stage2 / 11)); const result = gradient.toString(16); - return (result.length === 1 ? "0" : "") + result + "0"; + return (result.length === 1 ? "0" : "") + result + "1"; }; const FormatsObj: FormatObj = { @@ -75,11 +75,11 @@ const FormatsObj: FormatObj = { } }, - listFormats: function() { + listFormats: function () { return Object.keys(this.formats); }, - getFormat: function(format: string) { + getFormat: function (format: string) { return this.formats[format]; } }; |
