@@ -2,7 +2,7 @@ import { effect } from '@vue/reactivity'
22import type { BrowserWindow , BrowserWindowConstructorOptions } from 'electron'
33import { nativeTheme , systemPreferences } from 'electron'
44import type { Theme , ThemeDefinition } from '@commas/types/theme'
5- import { isDarkColor , mix , toCSSColor , toCSSHEX , toElectronHEX , toHSLA , toRGBA , toRGBAFromHSLA } from '../../shared/color'
5+ import { isDarkColor , mix , toCSSColor , toCSSHEX , toElectronHEX , toHSLA , toRGBA } from '../../shared/color'
66import { provideIPC } from '../utils/compositions'
77import { resourceFile , userFile } from '../utils/directory'
88import { useDefaultSettings , useSettings } from './settings'
@@ -176,10 +176,9 @@ const theme = $computed(() => {
176176 definition . systemMagenta = systemPreferences . getSystemColor ( 'pink' )
177177 }
178178 definition . systemAccent = accentColor ? `#${ accentColor . slice ( 0 , 6 ) } ` : ''
179- const accentHSLA = accentColor ? toHSLA ( toRGBA ( `#${ accentColor . slice ( 0 , 6 ) } ` ) ) : undefined
180- definition . acrylicBackground = accentHSLA ? toCSSHEX (
181- toRGBAFromHSLA ( { ...accentHSLA , l : ( 0.5 + accentHSLA . l / 2 ) } ) ,
182- ) : ''
179+ const backgroundHSLA = toHSLA ( backgroundRGBA )
180+ const accentRGBA = accentColor ? toRGBA ( `#${ accentColor . slice ( 0 , 6 ) } ` ) : undefined
181+ definition . acrylicBackground = accentRGBA ? toCSSHEX ( mix ( backgroundRGBA , accentRGBA , backgroundHSLA . s ) ) : ''
183182 definition . vibrancy = opacity < 1 ? undefined : vibrancy
184183 definition . variables = Object . fromEntries ( [
185184 ...Object . entries ( { ...THEME_CSS_COLORS , ...EXTRA_CSS_COLORS } ) . map ( ( [ key , attr ] ) => {
0 commit comments