Skip to content

Commit a131d21

Browse files
author
codeErrorSleep
committed
style(ui): Adjust the dark theme color from warm to cool colors
- Update the CSS custom properties in theme.css to adjust the main color from warm brown (oklch 65 hue) to cool blue (oklch 260 hue) - Rename and update the dark theme variable of the SqlEditor component, replacing the warm code editor theme with a cool AI style theme - Ensure visual consistency and improve modernity and readability in dark mode
1 parent 8a9eac0 commit a131d21

2 files changed

Lines changed: 34 additions & 34 deletions

File tree

src/components/business/Editor/SqlEditor.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,40 @@ import {
2323
TooltipTrigger,
2424
} from "@/components/ui/tooltip";
2525

26-
const warmDarkEditorOverrides = EditorView.theme(
26+
const aiDarkEditorOverrides = EditorView.theme(
2727
{
2828
"&": {
29-
backgroundColor: "#2e2a26",
30-
color: "#f0ebe3",
29+
backgroundColor: "#1f2128",
30+
color: "#e6eaf2",
3131
},
3232
".cm-content": {
33-
caretColor: "#f0ebe3",
33+
caretColor: "#e6eaf2",
3434
},
3535
".cm-gutters": {
36-
backgroundColor: "#34302b",
37-
color: "#b9afa3",
38-
borderRight: "1px solid #5f5851",
36+
backgroundColor: "#242730",
37+
color: "#aab2c0",
38+
borderRight: "1px solid #353944",
3939
},
4040
".cm-activeLine": {
41-
backgroundColor: "rgba(221, 202, 180, 0.10)",
41+
backgroundColor: "rgba(255, 255, 255, 0.04)",
4242
},
4343
".cm-activeLineGutter": {
44-
backgroundColor: "rgba(221, 202, 180, 0.12)",
44+
backgroundColor: "rgba(255, 255, 255, 0.04)",
4545
},
4646
".cm-selectionBackground, &.cm-focused .cm-selectionBackground, ::selection": {
47-
backgroundColor: "rgba(221, 202, 180, 0.24)",
47+
backgroundColor: "rgba(140, 170, 255, 0.25)",
4848
},
4949
".cm-cursor, .cm-dropCursor": {
50-
borderLeftColor: "#f0ebe3",
50+
borderLeftColor: "#e6eaf2",
5151
},
5252
".cm-tooltip": {
53-
backgroundColor: "#3a342e",
54-
color: "#f0ebe3",
55-
border: "1px solid #6b6359",
53+
backgroundColor: "#2a2f3a",
54+
color: "#e6eaf2",
55+
border: "1px solid #3b4250",
5656
},
5757
".cm-tooltip-autocomplete ul li[aria-selected]": {
58-
backgroundColor: "rgba(221, 202, 180, 0.18)",
59-
color: "#fff8ef",
58+
backgroundColor: "rgba(140, 170, 255, 0.20)",
59+
color: "#f2f5fb",
6060
},
6161
},
6262
{ dark: true },
@@ -342,7 +342,7 @@ export function SqlEditor({
342342
// Theme
343343
const editorTheme = useMemo(() => {
344344
const isDark = theme === "dark" || (theme === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches);
345-
return isDark ? [oneDark, warmDarkEditorOverrides] : [];
345+
return isDark ? [oneDark, aiDarkEditorOverrides] : [];
346346
}, [theme]);
347347

348348
return (

src/styles/theme.css

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,42 +42,42 @@
4242
}
4343

4444
.dark {
45-
--background: oklch(0.2 0.006 65);
46-
--foreground: oklch(0.95 0.01 80);
47-
--card: oklch(0.24 0.007 65);
45+
--background: oklch(0.18 0.003 260);
46+
--foreground: oklch(0.94 0.004 260);
47+
--card: oklch(0.22 0.003 260);
4848
--card-foreground: oklch(0.985 0 0);
49-
--popover: oklch(0.26 0.007 65);
49+
--popover: oklch(0.24 0.003 260);
5050
--popover-foreground: oklch(0.985 0 0);
5151
--primary: oklch(0.985 0 0);
5252
--primary-foreground: oklch(0.205 0 0);
53-
--secondary: oklch(0.3 0.007 65);
53+
--secondary: oklch(0.27 0.003 260);
5454
--secondary-foreground: oklch(0.985 0 0);
55-
--muted: oklch(0.29 0.006 65);
56-
--muted-foreground: oklch(0.78 0.01 70);
57-
--accent: oklch(0.32 0.008 65);
55+
--muted: oklch(0.25 0.003 260);
56+
--muted-foreground: oklch(0.72 0.004 260);
57+
--accent: oklch(0.29 0.004 260);
5858
--accent-foreground: oklch(0.985 0 0);
5959
--destructive: oklch(0.396 0.141 25.723);
6060
--destructive-foreground: oklch(0.637 0.237 25.331);
61-
--border: oklch(0.36 0.006 65);
62-
--input: oklch(0.31 0.006 65);
63-
--input-background: oklch(0.27 0.006 65);
64-
--switch-background: oklch(0.4 0.006 65);
65-
--ring: oklch(0.62 0.02 75);
61+
--border: oklch(0.33 0.003 260);
62+
--input: oklch(0.28 0.003 260);
63+
--input-background: oklch(0.23 0.003 260);
64+
--switch-background: oklch(0.38 0.003 260);
65+
--ring: oklch(0.6 0.02 255);
6666
--font-weight-medium: 500;
6767
--font-weight-normal: 400;
6868
--chart-1: oklch(0.488 0.243 264.376);
6969
--chart-2: oklch(0.696 0.17 162.48);
7070
--chart-3: oklch(0.769 0.188 70.08);
7171
--chart-4: oklch(0.627 0.265 303.9);
7272
--chart-5: oklch(0.645 0.246 16.439);
73-
--sidebar: oklch(0.22 0.006 65);
73+
--sidebar: oklch(0.2 0.003 260);
7474
--sidebar-foreground: oklch(0.985 0 0);
7575
--sidebar-primary: oklch(0.488 0.243 264.376);
7676
--sidebar-primary-foreground: oklch(0.985 0 0);
77-
--sidebar-accent: oklch(0.3 0.007 65);
77+
--sidebar-accent: oklch(0.27 0.003 260);
7878
--sidebar-accent-foreground: oklch(0.985 0 0);
79-
--sidebar-border: oklch(0.35 0.006 65);
80-
--sidebar-ring: oklch(0.6 0.02 75);
79+
--sidebar-border: oklch(0.32 0.003 260);
80+
--sidebar-ring: oklch(0.58 0.02 255);
8181
}
8282

8383
@theme inline {

0 commit comments

Comments
 (0)