diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-12 15:18:49 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-12 15:18:49 -0500 |
| commit | bc549648b38698b7bd3cb71ab7e71bb17a3a68a1 (patch) | |
| tree | 5c90212500585e80f2a7ba88613eff83bae222e9 /src/formats.ts | |
| parent | 6087e80f822273b9840d390365fab11c72b6652b (diff) | |
| download | ao-coverage-bc549648b38698b7bd3cb71ab7e71bb17a3a68a1.tar.gz ao-coverage-bc549648b38698b7bd3cb71ab7e71bb17a3a68a1.tar.bz2 ao-coverage-bc549648b38698b7bd3cb71ab7e71bb17a3a68a1.zip | |
Fix color matcher for inbetween step values
Diffstat (limited to 'src/formats.ts')
| -rw-r--r-- | src/formats.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/formats.ts b/src/formats.ts index 86d3f6b..b64c418 100644 --- a/src/formats.ts +++ b/src/formats.ts @@ -33,8 +33,10 @@ export const defaultColorMatches = ( ? 15 : coverage >= style.stage2 ? Math.floor( - ((style.stage1 - coverage) / (style.stage1 - style.stage2)) * 240 - ) + 15 + ((style.stage1 - coverage) / (style.stage1 - style.stage2)) * 15 + ) * + 16 + + 15 : 240 + Math.floor(coverage / (style.stage2 / 15)); const result = gradient.toString(16); return (result.length === 1 ? "0" : "") + result + "0"; |
