Tailwind v4 主題色產生器

輸入一個主色,自動產生 Tailwind CSS 標準的 11 級色階(50-950),支援匯出為 @theme 設定程式碼。

基礎顏色

H
217°
S
91%
L
60%

預設顏色

匯出程式碼

@import "tailwindcss";

@theme {
  --color-brand-50: #f3f6fc;
  --color-brand-100: #e5edfb;
  --color-brand-200: #c3d8f9;
  --color-brand-300: #8db6f6;
  --color-brand-400: #468af6;
  --color-brand-500: #0b64f4;
  --color-brand-600: #0453d2;
  --color-brand-700: #0143ad;
  --color-brand-800: #013384;
  --color-brand-900: #002766;
  --color-brand-950: #00173d;
}

色階預覽

brand
50#f3f6fc
hsl(217, 61%, 97%)
100#e5edfb
hsl(217, 71%, 94%)
200#c3d8f9
hsl(217, 81%, 87%)
300#8db6f6
hsl(217, 86%, 76%)
400#468af6
hsl(217, 91%, 62%)
500#0b64f4
hsl(217, 91%, 50%)
600#0453d2
hsl(217, 96%, 42%)
700#0143ad
hsl(217, 99%, 34%)
800#013384
hsl(217, 99%, 26%)
900#002766
hsl(217, 100%, 20%)
950#00173d
hsl(217, 100%, 12%)

色階條

50
100
200
300
400
500
600
700
800
900
950

文字對比預覽

色階 50

#f3f6fc

The quick brown fox jumps over the lazy dog.

色階 100

#e5edfb

The quick brown fox jumps over the lazy dog.

色階 200

#c3d8f9

The quick brown fox jumps over the lazy dog.

色階 300

#8db6f6

The quick brown fox jumps over the lazy dog.

色階 400

#468af6

The quick brown fox jumps over the lazy dog.

色階 500

#0b64f4

The quick brown fox jumps over the lazy dog.

色階 600

#0453d2

The quick brown fox jumps over the lazy dog.

色階 700

#0143ad

The quick brown fox jumps over the lazy dog.

色階 800

#013384

The quick brown fox jumps over the lazy dog.

色階 900

#002766

The quick brown fox jumps over the lazy dog.

色階 950

#00173d

The quick brown fox jumps over the lazy dog.

說明

功能說明

  • Tailwind CSS v4 預設使用 50-950 的色階系統,並使用 @theme 區塊設定
  • 以 HSL 色彩空間為基礎,從基礎顏色產生 50-950 共 11 級色階
  • 色階系統與 Tailwind CSS 預設色階一致,可直接用於專案
  • 支援匯出為 Tailwind v4 @theme 設定程式碼
  • 內建 17 種預設顏色,一鍵套用常用品牌色
  • 即時預覽文字在各級色階上的對比效果

使用技巧

  • 點擊左側色塊可開啟系統色彩選擇器
  • 輸入 HEX 值(例如 #3b82f6)可精確指定顏色
  • 填寫主題名稱後,匯出程式碼中的變數名稱會自動替換
  • 匯出 Tailwind v4 格式時,使用 @theme 指令設定自訂顏色
  • 將滑鼠移到色階條上可查看對應的色階編號,點擊即可複製 HEX 值
  • 文字對比預覽可協助你挑選合適的文字顏色搭配