From c70567e9b105d937fc687df12ab5a72f7ba94e34 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 10 Mar 2023 14:14:40 +0100 Subject: [PATCH] using different colors if main and text are the same closes #4060 --- frontend/src/ts/test/test-ui.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 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 { 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, ]; + let unreachedColor = themeColors.sub; - const 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 = [ {