UI Hub 是一个每日更新的免费 UI 资源目录,给设计师、前端开发者和做界面的 AI Agent 用:共 2,395 条资源,其中 133 个组件库、1,929 个带明暗预览的组件样式示例,另有设计 skill 与 AI 设计技巧文章。UI Hub 是一個每日更新的免費 UI 資源目錄,給設計師、前端開發者和做介面的 AI Agent 用:共 2,395 條資源,其中 133 個元件庫、1,929 個附明暗預覽的元件樣式示例,另有設計 skill 與 AI 設計技巧文章。UI Hub is a free, daily-updated directory of UI resources for designers, front-end developers and AI agents that build interfaces: 2,395 resources, including 133 component libraries and 1,929 component style demos with light/dark previews, plus design skills and AI design articles.UI Hub は、デザイナー・フロントエンド開発者・UI を作る AI エージェント向けの、毎日更新される無料の UI リソース集です。全 2,395 件(コンポーネントライブラリ 133 件、ライト/ダーク対応のスタイルデモ 1,929 件)に加え、デザインスキルと AI デザイン記事を掲載しています。UI Hub는 디자이너, 프론트엔드 개발자, 인터페이스를 만드는 AI 에이전트를 위한 매일 업데이트되는 무료 UI 리소스 디렉터리입니다. 총 2,395개 리소스(컴포넌트 라이브러리 133개, 라이트/다크 미리보기가 있는 스타일 데모 1,929개)와 디자인 스킬, AI 디자인 글을 제공합니다.UI Hub ialah direktori sumber UI percuma yang dikemas kini setiap hari untuk pereka, pembangun front-end dan ejen AI yang membina antara muka: 2,395 sumber, termasuk 133 pustaka komponen dan 1,929 demo gaya komponen dengan pratonton terang/gelap, serta kemahiran reka bentuk dan artikel reka bentuk AI.UI Hub là danh mục tài nguyên UI miễn phí, cập nhật hằng ngày, dành cho nhà thiết kế, lập trình viên front-end và AI agent dựng giao diện: 2,395 tài nguyên, gồm 133 thư viện component và 1,929 mẫu phong cách component có xem trước sáng/tối, cùng skill thiết kế và bài viết về thiết kế với AI.UI Hub est un annuaire gratuit de ressources UI, mis à jour chaque jour, pour designers, développeurs front-end et agents IA qui construisent des interfaces : 2,395 ressources, dont 133 bibliothèques de composants et 1,929 démos de styles avec aperçus clair/sombre, plus des skills de design et des articles sur le design avec l’IA.UI Hub es un directorio gratuito de recursos de UI, actualizado a diario, para diseñadores, desarrolladores front-end y agentes de IA que construyen interfaces: 2,395 recursos, incluidas 133 bibliotecas de componentes y 1,929 demos de estilos con vista clara/oscura, además de skills de diseño y artículos de diseño con IA.UI Hub ist ein kostenloses, täglich aktualisiertes Verzeichnis von UI-Ressourcen für Designer, Frontend-Entwickler und KI-Agents, die Oberflächen bauen: 2,395 Ressourcen, darunter 133 Komponentenbibliotheken und 1,929 Komponenten-Stildemos mit Hell/Dunkel-Vorschau, dazu Design-Skills und Artikel zu KI-Design.

← 返回博客返回部落格Back to blogブログへ戻る블로그로Kembali ke blogVề blogRetour au blogVolver al blogZurück zum Blog · 设计手艺設計手藝Craftクラフト디자인 기본기KemahiranTay nghềSavoir-faireOficioHandwerk · 2026-10-14 · 8 分钟阅读8 分鐘閱讀6 min read6 分で読めます6 분 읽기6 min bacaan6 phút đọc6 min de lecture6 min de lectura6 Min. Lesezeit

把暗色模式做对:token、层级与对比度把暗色模式做對:token、層級與對比度Dark mode done right: tokens, elevation and contrast正しいダークモード:トークン・階層・コントラスト다크 모드 제대로: 토큰, 고도, 대비Mod gelap yang betul: token, ketinggian dan kontrasLàm dark mode đúng: token, độ nổi và độ tương phảnUn mode sombre réussi : tokens, élévation et contrasteModo oscuro bien hecho: tokens, elevación y contrasteDark Mode richtig: Tokens, Elevation und Kontrast

暗色模式是第二套配色,不是反色。用语义 token,用更亮的表面表达层级,强调色要降饱和。暗色模式是第二套配色,不是反色。用語義 token,用更亮的表面表達層級。Dark mode is a second palette, not an inverted one. Use semantic tokens, lighter surfaces for elevation, and desaturated accents.ダークモードは反転ではなく第二のパレット。意味トークン、明るい面で階層、彩度を下げたアクセント。다크 모드는 반전이 아니라 두 번째 팔레트. 시맨틱 토큰, 밝은 면으로 고도 표현.Mod gelap ialah palet kedua, bukan terbalik. Guna token semantik dan permukaan lebih cerah untuk ketinggian.Dark mode là bảng màu thứ hai, không phải đảo màu. Dùng token ngữ nghĩa, bề mặt sáng hơn để thể hiện độ nổi.Une seconde palette, pas une inversion. Tokens sémantiques, surfaces plus claires pour l'élévation.Una segunda paleta, no una inversión. Tokens semánticos y superficies más claras para la elevación.Eine zweite Palette, keine Invertierung. Semantische Tokens, hellere Flächen für Elevation.

Dark mode done right: tokens, elevation and contrast

正文以簡體中文顯示。

本文は英語で表示しています。

본문은 영어로 표시됩니다.

Kandungan dipaparkan dalam bahasa Inggeris.

Nội dung hiển thị bằng tiếng Anh.

Le corps de l’article est en anglais.

El cuerpo del artículo está en inglés.

Der Beitragstext ist auf Englisch.

Inverting colours is the fastest way to ship a bad dark mode: pure black backgrounds, glowing saturated blues, borders that vanish and shadows nobody can see. Apple's Human Interface Guidelines and web.dev both treat dark mode as its own design pass, not a filter. This post covers the token structure that makes two themes cheap, the rules for surfaces, colour and contrast, a step-by-step implementation without the white flash, and what to check before you ship.

The same card rendered with light and dark semantic tokens
The same card rendered with light and dark semantic tokens · Diagram: original by UI Hub, CC BY 4.0

Start from semantic tokens

The single decision that makes dark mode manageable is naming colours by role, not by value. Components use --bg, --surface, --ink, --muted, --line and --accent. Each theme assigns values to those roles. A component never knows which theme it is in.

:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;  --surface: #ffffff;  --raised: #ffffff;
  --ink: #0a0c14; --muted: #4a5164;    --line: rgb(10 12 20 / .10);
  --accent: #2563eb;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06070b;  --surface: #0d0f15;  --raised: #151924;
  --ink: #f3f5fb; --muted: #a6adbf;    --line: rgb(255 255 255 / .10);
  --accent: #67e8f9;
}
.card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
Apple Human Interface Guidelines: Dark Mode
Apple Human Interface Guidelines: Dark Mode · Screenshot: Apple (developer.apple.com), captured 2026-10-14. © the original site.

If your codebase has #fff and text-gray-900 scattered through components, the first step of a dark mode project is replacing them with roles. Agents are good at this mechanical refactor when you give them the role table.

Rules for surfaces and colour

  1. Off-black, not black. Pure #000 behind white text maximises halation (the glow around bright text) on many screens. A very dark blue-grey such as #06070b reads as black and is easier on the eyes.
  2. Off-white text. #f3f5fb instead of #ffffff for body text; reserve pure white for small emphasis if at all.
  3. Elevation by lightness. In light mode, shadows separate layers. In dark mode, shadows barely show, so raised surfaces get slightly lighter: background, then surface, then raised. Material's dark theme guidance uses the same idea.
  4. Desaturate and lighten accents. A saturated #2563eb that works on white vibrates on near-black. Pick a lighter, less saturated accent for dark, and check it as text and as a button fill separately.
  5. Borders carry more weight. With weak shadows, a 1px translucent line is often what separates cards from the background.
  6. Images and illustrations. Logos and diagrams with white backgrounds become glaring rectangles. Provide dark variants or put them on a neutral surface.

Contrast in both themes

WCAG asks for at least 4.5:1 contrast for normal text and 3:1 for large text and UI components. Check muted text, placeholder text, disabled states and links in both themes. The usual failure is muted grey that passes on white and fails on near-black, or the reverse.

Step by step: implementing the switch

Step 1: respect the system, remember the choice. Default to prefers-color-scheme, let the user override it, and store the override.

Step 2: set the theme before first paint. A tiny inline script in <head> avoids the white flash on load:

<script>
  try {
    const saved = localStorage.getItem("theme");
    const sys = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
    document.documentElement.dataset.theme = saved || sys;
  } catch (e) {
    document.documentElement.dataset.theme = "light";
  }
</script>

Step 3: set color-scheme. It tells the browser to render form controls, scrollbars and the default canvas in the right theme. Without it you get light scrollbars on a dark page.

Step 4: consider light-dark(). Modern browsers support the CSS light-dark() function, which picks a value based on the active color-scheme. It is handy for one-off values: border-color: light-dark(#e5e7eb, #262a35);.

Step 5: wire the toggle. Update data-theme, save the choice, and update aria-pressed or the label so screen-reader users know the current state.

A five-minute dark-mode review

Open the page in dark mode on a real phone at low brightness and on a laptop at full brightness. Look for four things: text that glows or blurs at the edges (too much contrast, often pure white on pure black), cards that disappear into the background (missing border or lightness step), accent colours that vibrate, and any white rectangle (an image, embed or code block that was never themed). Then switch themes with the toggle and reload: the page should come back in the theme you chose, without a flash.

Pitfalls

Questions we get

Should dark mode be the default? Follow the system setting by default. Users who prefer dark have usually already said so at the operating-system level, and the same goes for light. A manual toggle covers everyone else.

Do we need a separate dark design in Figma? You need dark values for every role token and a review of key screens in dark. You do not need to redraw every screen if components use role tokens; the theme swap does the work.

What about charts and data visualisation? Chart palettes need their own dark variants. Colours that are distinguishable on white can merge on near-black, so check categorical colours side by side in both themes, and never rely on colour alone to distinguish series.

How do we keep the two themes from drifting? Run visual regression screenshots in both themes and fail the build on unexpected changes. Treat a component that looks wrong in one theme as a bug, not a polish item.

Is "dim" or high-contrast a third theme? If users need it, yes, and the role-token structure makes it a third column of values. Respect prefers-contrast before inventing a custom option.

Our take

NN/g's research shows preference between dark and light is split and situational, so ship both and remember the choice. The cost of the second theme is almost entirely in the token structure: get roles right and dark mode is a second column of values. UI Hub stores light and dark preview screenshots for each component for exactly this reason; a component that only looks good in one theme is half finished.

web.dev article on prefers-color-scheme
web.dev article on prefers-color-scheme · Screenshot: web.dev (Google) (web.dev), captured 2026-10-14. © the original site.

Checklist

AI 提示词AI 提示詞AI promptAIプロンプトAI 프롬프트Prompt AIPrompt cho AIPrompt IAPrompt de IAKI-Prompt

复制给 Claude、Cursor、v0 等 AI 助手,让它按本文的方法处理你的项目。尖括号里的内容换成你自己的。複製給 Claude、Cursor、v0 等 AI 助手,讓它按本文的方法處理你的專案。尖括號裡的內容換成你自己的。Paste this into Claude, Cursor, v0 or another assistant to apply this post to your own project. Replace the parts in angle brackets.Claude・Cursor・v0 などのAIアシスタントに貼り付けると、この記事の方法をあなたのプロジェクトに適用できます。山括弧の部分は自分の内容に置き換えてください。Claude, Cursor, v0 같은 AI 도우미에 붙여 넣으면 이 글의 방법을 내 프로젝트에 적용할 수 있습니다. 꺾쇠괄호 안은 내 내용으로 바꾸세요.Tampal ke Claude, Cursor, v0 atau pembantu lain untuk menggunakan kaedah artikel ini pada projek anda. Gantikan bahagian dalam kurungan sudut.Dán vào Claude, Cursor, v0 hoặc trợ lý khác để áp dụng bài này cho dự án của bạn. Thay phần trong dấu ngoặc nhọn bằng nội dung của bạn.Collez-le dans Claude, Cursor, v0 ou un autre assistant pour appliquer cet article à votre projet. Remplacez les parties entre chevrons.Pégalo en Claude, Cursor, v0 u otro asistente para aplicar este artículo a tu proyecto. Sustituye lo que está entre corchetes angulares.In Claude, Cursor, v0 oder einen anderen Assistenten einfügen, um diesen Beitrag auf dein Projekt anzuwenden. Teile in spitzen Klammern ersetzen.

为 <项目> 做一套规范的深色主题,或者走查现有的深色主题。
1. 找出组件里所有裸颜色(hex、rgb、Tailwind 颜色类名)并列出来。提出一张角色表:--bg、--surface、--raised、--ink、--muted、--line、--accent(用到的话再加 danger/success)。
2. 用角色变量替换裸颜色。分别为 [data-theme="light"] 和 [data-theme="dark"] 定义数值,并在两者中设置 color-scheme。
3. 深色数值:近黑背景(不要 #000)、近白文字(不要 #fff)、浮层比背景更亮、强调色更亮且饱和度更低。
4. 在两套主题里检查 WCAG 对比度(文字 4.5:1,大字/界面组件 3:1):正文、次要文字、占位文字、链接和按钮;输出带比值的表格,并修复不合格项。
5. 在 <head> 加一段内联脚本,在首次绘制前设置 data-theme(优先用已保存的选择,否则用 prefers-color-scheme);加一个切换按钮,保存选择并更新 aria-pressed。
6. 列出需要深色版本的第三方嵌入、图片和代码块。
不要使用 filter: invert。
为 <项目> 做一套规范的深色主题,或者走查现有的深色主题。
1. 找出组件里所有裸颜色(hex、rgb、Tailwind 颜色类名)并列出来。提出一张角色表:--bg、--surface、--raised、--ink、--muted、--line、--accent(用到的话再加 danger/success)。
2. 用角色变量替换裸颜色。分别为 [data-theme="light"] 和 [data-theme="dark"] 定义数值,并在两者中设置 color-scheme。
3. 深色数值:近黑背景(不要 #000)、近白文字(不要 #fff)、浮层比背景更亮、强调色更亮且饱和度更低。
4. 在两套主题里检查 WCAG 对比度(文字 4.5:1,大字/界面组件 3:1):正文、次要文字、占位文字、链接和按钮;输出带比值的表格,并修复不合格项。
5. 在 <head> 加一段内联脚本,在首次绘制前设置 data-theme(优先用已保存的选择,否则用 prefers-color-scheme);加一个切换按钮,保存选择并更新 aria-pressed。
6. 列出需要深色版本的第三方嵌入、图片和代码块。
不要使用 filter: invert。
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.
Add a proper dark theme to <project>, or audit the existing one.
1. Find every raw colour in components (hex, rgb, Tailwind colour classes) and list them. Propose a role table: --bg, --surface, --raised, --ink, --muted, --line, --accent (+ danger/success if used).
2. Replace raw colours with role variables. Define values for [data-theme="light"] and [data-theme="dark"]; set color-scheme in each.
3. Dark values: off-black background (not #000), off-white text (not #fff), raised surfaces lighter than the background, a lighter/less saturated accent.
4. Check WCAG contrast (4.5:1 text, 3:1 large text/UI) for ink, muted, placeholder, links and buttons in BOTH themes; report a table with the ratios and fix failures.
5. Add an inline <head> script that sets data-theme before first paint (saved choice, else prefers-color-scheme), and a toggle that saves the choice and updates aria-pressed.
6. List third-party embeds, images and code blocks that need dark variants.
Do not use filter: invert.

引用来源引用來源References参考文献참고 자료RujukanNguồn tham khảoRéférencesReferenciasQuellen

  1. Dark Mode — Human Interface Guidelines — Apple
  2. prefers-color-scheme: Hello darkness, my old friend — web.dev (Thomas Steiner)
  3. Dark Mode vs. Light Mode: Which Is Better? — Nielsen Norman Group
  4. Dark mode — Tailwind CSS
  5. color-scheme — MDN
  6. light-dark() — MDN
  7. Understanding SC 1.4.3 Contrast (Minimum) — W3C WAI
  8. Color system overview — Material 3 — Google
  9. prefers-contrast — MDN

相关文章相關文章Related posts関連記事관련 글Artikel berkaitanBài liên quanArticles liésArtículos relacionadosÄhnliche Beiträge

设计手艺設計手藝Craftクラフト디자인 기본기KemahiranTay nghềSavoir-faireOficioHandwerk2026-10-142 分钟阅读2 分鐘閱讀2 min read2 分で読めます2 분 읽기2 min bacaan2 phút đọc2 min de lecture2 min de lectura2 Min. Lesezeit

AI 生成界面的字体排印:摆脱平庸感最快的办法AI 產生介面的字體排印:擺脫平庸感最快的辦法Typography for AI-generated UI: the fastest way to look less genericAI生成UIのタイポグラフィ:没個性から抜け出す最短路AI 생성 UI의 타이포그래피: 평범함을 벗는 가장 빠른 길Tipografi untuk UI jana AITypography cho UI do AI tạo: cách nhanh nhất để bớt tầm thườngLa typographie des UI générées par IATipografía para UI generada por IATypografie für KI-generierte UIs

生成器默认一种无衬线、三个字号。一套字号阶梯、第二种字体、大字号收紧字距和合理行长,能解决大部分问题。產生器預設一種無襯線、三個字級。一套字級階梯、第二種字體、大字收緊字距和合理行長,能解決大部分問題。Generators default to one sans at three sizes. A type scale, a second typeface, tighter tracking on display sizes and real line lengths fix most of it.生成器は1書体3サイズが既定。スケール、第2書体、見出しの字詰め、行長で大半が直る。생성기는 산세리프 하나에 크기 셋. 스케일, 두 번째 서체, 자간, 줄 길이로 대부분 해결.Skala jenis, muka taip kedua, jarak huruf dan panjang baris menyelesaikan kebanyakannya.Thang cỡ chữ, font thứ hai, giãn chữ và độ dài dòng giải quyết phần lớn.Une échelle, une seconde police, l'approche et la longueur de ligne règlent l'essentiel.Una escala, una segunda fuente, el tracking y la longitud de línea resuelven casi todo.Skala, zweite Schrift, Laufweite und Zeilenlänge lösen das meiste.

typographytokens
设计手艺設計手藝Craftクラフト디자인 기본기KemahiranTay nghềSavoir-faireOficioHandwerk2026-10-142 分钟阅读2 分鐘閱讀2 min read2 分で読めます2 분 읽기2 min bacaan2 phút đọc2 min de lecture2 min de lectura2 Min. Lesezeit

OKLCH 色彩系统:经得起暗色模式的调色板OKLCH 色彩系統:經得起暗色模式的調色盤OKLCH colour systems: palettes that survive dark modeOKLCHカラー:ダークモードに耐えるパレットOKLCH 색 체계: 다크 모드에서도 버티는 팔레트Sistem warna OKLCH: palet yang tahan mod gelapHệ màu OKLCH: bảng màu sống sót trong dark modeCouleurs OKLCH : des palettes qui tiennent en mode sombreColor OKLCH: paletas que sobreviven al modo oscuroOKLCH-Farben: Paletten, die den Dark Mode überstehen

OKLCH 让不同色相的感知亮度保持一致,色阶和暗色主题可以靠计算而不是靠肉眼。Tailwind v4 默认就用它。OKLCH 讓不同色相的感知亮度保持一致,色階與暗色主題可以靠計算而非肉眼。Tailwind v4 預設就用它。OKLCH keeps perceived lightness consistent across hues, so you can generate scales and dark themes by math instead of eyeballing. Tailwind v4 uses it by default.OKLCHは色相間で知覚明度を揃え、計算でスケールとダークテーマを作れる。Tailwind v4の既定。OKLCH는 색상 간 지각 명도를 맞춰 계산으로 스케일과 다크 테마를 만든다. Tailwind v4 기본값.OKLCH mengekalkan kecerahan persepsi; Tailwind v4 menggunakannya secara lalai.OKLCH giữ độ sáng cảm nhận đồng đều; Tailwind v4 dùng mặc định.OKLCH garde une luminosité perçue constante ; Tailwind v4 l'utilise par défaut.OKLCH mantiene la luminosidad percibida; Tailwind v4 lo usa por defecto.OKLCH hält die wahrgenommene Helligkeit konstant; Standard in Tailwind v4.

colorOKLCHdark mode
设计手艺設計手藝Craftクラフト디자인 기본기KemahiranTay nghềSavoir-faireOficioHandwerk2026-10-148 分钟阅读8 分鐘閱讀6 min read6 分で読めます6 분 읽기6 min bacaan6 phút đọc6 min de lecture6 min de lectura6 Min. Lesezeit

让动效"对味":目的、时长、缓动与克制讓動效「對味」:目的、時長、緩動與克制Motion that feels right: purpose, duration, easing, restraintしっくりくるモーション:目的・時間・イージング・抑制자연스러운 모션: 목적, 시간, 이징, 절제Gerakan yang terasa betul: tujuan, tempoh, easing, kawalanChuyển động đúng cảm giác: mục đích, thời lượng, easing, tiết chếUn mouvement juste : intention, durée, easing, retenueMovimiento que se siente bien: propósito, duración, easing, contenciónBewegung, die sich richtig anfühlt: Zweck, Dauer, Easing, Zurückhaltung

大多数界面动效应在 300ms 内、用 ease-out,高频操作干脆不做。炫技属于营销页,不属于工具。大多數介面動效應在 300ms 內、用 ease-out,高頻操作乾脆不做。Most UI motion should be under 300ms, ease-out, and skipped for frequent actions. Spectacle belongs on marketing pages, not in tools.UIモーションは300ms以内・ease-out、頻繁な操作には付けない。UI 모션은 300ms 이하, ease-out, 잦은 동작엔 생략.Kebanyakan gerakan UI di bawah 300ms, ease-out, dan dilangkau untuk tindakan kerap.Hầu hết chuyển động dưới 300ms, ease-out, bỏ qua với thao tác thường xuyên.Moins de 300 ms, ease-out, et rien pour les actions fréquentes.Menos de 300 ms, ease-out, y nada en acciones frecuentes.Unter 300 ms, ease-out, und keine Animation für häufige Aktionen.

motion