diff options
author | Miodec <[email protected]> | 2023-03-10 14:14:40 +0100 |
---|---|---|
committer | Miodec <[email protected]> | 2023-03-10 14:25:11 +0100 |
commit | c70567e9b105d937fc687df12ab5a72f7ba94e34 (patch) | |
tree | d4cba0d8768bd7bfbfb8d415dd2fcd82b206e796 | |
parent | 104170c2958919182bd33cc828d7ca3fb448280d (diff) | |
download | monkeytype-c70567e9b105d937fc687df12ab5a72f7ba94e34.tar.gz monkeytype-c70567e9b105d937fc687df12ab5a72f7ba94e34.zip |
using different colors if main and text are the same
closes #4060
-rw-r--r-- | frontend/src/ts/test/test-ui.ts | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 2b4d413dd..03727d021 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1042,15 +1042,29 @@ export async function applyBurstHeatmap(): Promise<void> { const themeColors = await ThemeColors.getAll(); - const colors = [ + let colors = [ themeColors.colorfulError, Misc.blendTwoHexColors(themeColors.colorfulError, themeColors.text, 0.5), themeColors.text, Misc.blendTwoHexColors(themeColors.main, themeColors.text, 0.5), themeColors.main, ]; - - const unreachedColor = themeColors.sub; + let unreachedColor = themeColors.sub; + + if (themeColors.main === themeColors.text) { + colors = [ + themeColors.colorfulError, + Misc.blendTwoHexColors( + themeColors.colorfulError, + themeColors.text, + 0.5 + ), + themeColors.sub, + Misc.blendTwoHexColors(themeColors.sub, themeColors.text, 0.5), + themeColors.main, + ]; + unreachedColor = themeColors.subAlt; + } const steps = [ { |