File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2+ import { ACCENT_COLORS , type AccentColorId } from ' #shared/utils/constants'
3+
24const { accentColors, selectedAccentColor } = useAccentColor ()
3- const { convert : _convert, download : downloadBlob } = useSvgToPng ()
5+ const { download : downloadBlob } = useSvgToPng ()
46
57const customAccent = ref <string | null >(null )
68const customBgDark = ref (true )
79const customLogoRef = useTemplateRef (' customLogoRef' )
810
911const activeAccentId = computed (() => customAccent .value ?? selectedAccentColor .value ?? ' sky' )
1012const activeAccentColor = computed (() => {
11- const match = accentColors . value . find ( c => c . id === activeAccentId . value )
12- const fallback = accentColors .value [ 0 ]?. value ?? ' oklch(0.787 0.128 230.318) '
13- return match ? .value ?? fallback
13+ // Use light accent colors on light bg for proper contrast (e.g. neutral: dark on white, not white on white )
14+ const palette = customBgDark .value ? ACCENT_COLORS . dark : ACCENT_COLORS . light
15+ return palette [ activeAccentId .value as AccentColorId ] ?? palette . sky
1416})
1517
1618function getCustomSvgString(): string {
You can’t perform that action at this time.
0 commit comments