Skip to content

Commit ad60362

Browse files
committed
fix: convert hex codes to oklch
1 parent 3bc25ec commit ad60362

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

app/composables/useSettings.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ export function initAccentOnPrehydrate() {
9090
// Colors must be hardcoded since ACCENT_COLORS can't be referenced.
9191
onPrehydrate(() => {
9292
const colors: Record<AccentColorId, string> = {
93-
rose: '#e9aeba',
94-
amber: '#fbbf24',
95-
emerald: '#34d399',
96-
sky: '#38bdf8',
97-
violet: '#a78bfa',
98-
coral: '#fb7185',
93+
rose: 'oklch(0.797 0.084 11.056)',
94+
amber: 'oklch(0.828 0.165 84.429)',
95+
emerald: 'oklch(0.792 0.153 166.95)',
96+
sky: 'oklch(0.787 0.128 230.318)',
97+
violet: 'oklch(0.714 0.148 286.067)',
98+
coral: 'oklch(0.704 0.177 14.75)',
9999
}
100100
const settings = JSON.parse(localStorage.getItem('npmx-settings') || '{}')
101101
const color = settings.accentColorId ? colors[settings.accentColorId as AccentColorId] : null

shared/utils/constants.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export const ERROR_SUGGESTIONS_FETCH_FAILED = 'Failed to fetch suggestions.'
1919

2020
// Theming
2121
export const ACCENT_COLORS = {
22-
rose: '#e9aeba',
23-
amber: '#fbbf24',
24-
emerald: '#34d399',
25-
sky: '#38bdf8',
26-
violet: '#a78bfa',
27-
coral: '#fb7185',
22+
rose: 'oklch(0.797 0.084 11.056)',
23+
amber: 'oklch(0.828 0.165 84.429)',
24+
emerald: 'oklch(0.792 0.153 166.95)',
25+
sky: 'oklch(0.787 0.128 230.318)',
26+
violet: 'oklch(0.714 0.148 286.067)',
27+
coral: 'oklch(0.704 0.177 14.75)',
2828
} as const

0 commit comments

Comments
 (0)