Skip to content

Commit 72dbc04

Browse files
committed
style(dark): 深色背景压至接近纯黑,表面层级与通道底色、markdown alert 同步压暗
1 parent a68d998 commit 72dbc04

3 files changed

Lines changed: 28 additions & 21 deletions

File tree

css/channels.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@
1515
}
1616

1717
html.dark {
18-
/* 深色下不用高亮度粉彩,压暗一档,避免大面积色块刺眼 */
18+
/* 深色下不用高亮度粉彩,压暗一档,避免大面积色块刺眼;
19+
底色需贴近接近纯黑的页面背景(见 tokens.css),只保留极淡的色相倾向 */
1920
--icc-stable: #6fb87c;
20-
--icc-stable-bg: #16281a;
21+
--icc-stable-bg: #0e1a11;
2122
--icc-preview: #7aa9dd;
22-
--icc-preview-bg: #131f2e;
23+
--icc-preview-bg: #0c141d;
2324
--icc-beta: #a98fdc;
24-
--icc-beta-bg: #1f1830;
25+
--icc-beta-bg: #14101f;
2526
--icc-nightly: #d98d85;
26-
--icc-nightly-bg: #2e1614;
27+
--icc-nightly-bg: #1c0e0d;
2728
}
2829

2930

31+
3032
/* ---------- 通道切换按钮 ---------- */
3133
.segmented-btn-badge {
3234
margin-left: 0.25rem;

css/markdown.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@
160160
.md-alert--warning { --md-alert-color: #b26a00; }
161161
.md-alert--caution { --md-alert-color: #b3261e; }
162162

163-
html.dark .md-alert--note { --md-alert-color: #9ecbff; }
164-
html.dark .md-alert--tip { --md-alert-color: #8fd99a; }
165-
html.dark .md-alert--important { --md-alert-color: #cdb4ff; }
166-
html.dark .md-alert--warning { --md-alert-color: #ffcf7a; }
167-
html.dark .md-alert--caution { --md-alert-color: #ffb4ab; }
163+
/* 深色下与通道色板保持同一档亮度,避免比接近纯黑的背景反差过大 */
164+
html.dark .md-alert--note { --md-alert-color: #7aa9dd; }
165+
html.dark .md-alert--tip { --md-alert-color: #6fb87c; }
166+
html.dark .md-alert--important { --md-alert-color: #a98fdc; }
167+
html.dark .md-alert--warning { --md-alert-color: #d9ab5e; }
168+
html.dark .md-alert--caution { --md-alert-color: #d98d85; }
169+
170+

css/tokens.css

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,20 @@ html.dark {
7272
--md-sys-color-on-error: #690005;
7373
--md-sys-color-error-container: #93000a;
7474
--md-sys-color-on-error-container: #ffdad6;
75-
--md-sys-color-background: #1a1c1e;
75+
/* 深色底整体压到接近纯黑,层级之间只拉开很小的明度差 */
76+
--md-sys-color-background: #0a0b0c;
7677
--md-sys-color-on-background: #e2e2e6;
77-
--md-sys-color-surface: #1a1c1e;
78+
--md-sys-color-surface: #0a0b0c;
7879
--md-sys-color-on-surface: #e2e2e6;
79-
--md-sys-color-surface-variant: #42474e;
80-
--md-sys-color-on-surface-variant: #c2c7cf;
81-
--md-sys-color-outline: #8c9199;
82-
--md-sys-color-outline-variant: #42474e;
80+
--md-sys-color-surface-variant: #2a2d31;
81+
--md-sys-color-on-surface-variant: #b3b8c0;
82+
--md-sys-color-outline: #6b7078;
83+
--md-sys-color-outline-variant: #2a2d31;
8384
--md-sys-color-shadow: #000000;
84-
--md-sys-color-surface-container-lowest: #141619;
85-
--md-sys-color-surface-container-low: #1a1c1e;
86-
--md-sys-color-surface-container: #1e2022;
87-
--md-sys-color-surface-container-high: #282b2d;
88-
--md-sys-color-surface-container-highest: #333638;
85+
--md-sys-color-surface-container-lowest: #000000;
86+
--md-sys-color-surface-container-low: #101113;
87+
--md-sys-color-surface-container: #141517;
88+
--md-sys-color-surface-container-high: #1a1c1e;
89+
--md-sys-color-surface-container-highest: #212326;
90+
8991
}

0 commit comments

Comments
 (0)