From 6fc70ab11407b257ca7be72ab2896469a463802a Mon Sep 17 00:00:00 2001 From: Andrew Michael McNutt Date: Sun, 25 Feb 2024 14:38:58 -0800 Subject: [PATCH] make bgs persist --- src/content-modules/ComparePal.svelte | 7 ++++++- src/controls/GetColorsFromString.svelte | 2 +- src/controls/NewPal.svelte | 8 ++++++-- src/controls/SuggestionModificationToSelection.svelte | 2 +- src/example/ExampleAlaCarte.svelte | 1 + src/example/Examples.svelte | 2 +- src/example/Swatches.svelte | 4 ++-- src/linting/LintCustomizationModal.svelte | 4 ++-- src/linting/NewLintSuggestion.svelte | 2 +- src/stores/config-store.ts | 4 ++++ 10 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/content-modules/ComparePal.svelte b/src/content-modules/ComparePal.svelte index c9cf7303..217d24bc 100644 --- a/src/content-modules/ComparePal.svelte +++ b/src/content-modules/ComparePal.svelte @@ -27,7 +27,11 @@ ? $colorStore.palettes[compareIdx] : undefined; - $: bg = ComparisonPal?.background.toHex() || "white"; + $: bg = + $configStore.compareBackground || + ComparisonPal?.background.toHex() || + "white"; + let showDiff = false; let colorSpace = ComparisonPal?.colorSpace || "lab"; @@ -49,6 +53,7 @@ { bg = background.toHex(); + configStore.setCompareBackground(background.toHex()); }} bg={Color.colorFromHex(bg, colorSpace)} {colorSpace} diff --git a/src/controls/GetColorsFromString.svelte b/src/controls/GetColorsFromString.svelte index ca3dcfc4..016fa766 100644 --- a/src/controls/GetColorsFromString.svelte +++ b/src/controls/GetColorsFromString.svelte @@ -48,7 +48,7 @@