Colors

Primitive Colorが基本パレットを、Semantic Colorがテーマ対応の配色を提供する2層構造。CSS変数ベースでフレームワーク非依存です。

Primitive Colors

基礎となるカラーパレット。これらの値はSemantic Tokenから参照されます。

カスタマイズ可能

ブランドに合わせて自由にカスタマイズ可能です。実装時は bg-primary などのSemantic Token経由でご利用ください。

gray

背景、ボーダー、テキストなど、UIの基盤となるニュートラルカラー。ダークモード最適化設計

primary

ブランドカラー。主要なアクション、リンク、強調に使用

secondary

セカンダリアクション、補助的なUI要素に使用

blue

情報、リンク、進行中の状態を表すInfoカラー

green

成功、完了、肯定的な状態を表すSuccessカラー

yellow

警告、注意が必要な状態を表すWarningカラー

red

エラー、削除、危険な操作を表すErrorカラー

Semantic Colors

ライトモードとダークモード間で自動的に適応するテーマ対応カラー。同じCSS変数が各モードで異なる値を持ちます。

トークン形式
◻️

Background

ページやカードの背景色。4階層で深度を表現

Light
Dark

Border

区切り線、入力フィールドの枠線

Light
Dark
📝

Text

テキストの階層(本文、補足、リンクなど)

Light
Dark
🎯

Primary

主要なアクションボタン、リンク、強調

Light
Dark

Secondary

セカンダリボタン、補助的なUI要素

Light
Dark

Status

成功・警告・エラー・情報の状態表示

Light
Dark

Token Mapping

Figma → CSS → Tailwind の3段階マッピング

Background
background.default
bg-background--color-background
background.paper
bg-background-paper--color-background-paper
background.elevated
bg-background-elevated--color-background-elevated
background.muted
bg-background-muted--color-background-muted
AaText
text.default
text-foreground--color-text
text.muted
text-text-muted--color-text-muted
text.subtle
text-text-subtle--color-text-subtle
text.link
text-text-link--color-text-link
text.primary
text-text-primary--color-text-primary
text.info
text-text-info--color-text-info
text.success
text-text-success--color-text-success
text.error
text-text-error--color-text-error
text.warning
text-text-warning--color-text-warning
Border
border.default
border-border--color-border
border.strong
border-border-strong--color-border-strong
border.subtle
border-border-subtle--color-border-subtle
Primary
primary.default
bg-primary--color-primary
primary.hover
bg-primary-hover--color-primary-hover
primary.active
bg-primary-active--color-primary-active
primary.tint
bg-primary-tint--color-primary-tint
primary.text
text-primary-foreground--color-primary-text
Secondary
secondary.default
bg-secondary--color-secondary
secondary.hover
bg-secondary-hover--color-secondary-hover
secondary.active
bg-secondary-active--color-secondary-active
secondary.tint
bg-secondary-tint--color-secondary-tint
secondary.text
text-secondary-foreground--color-secondary-text
Status (Success / Warning / Error / Info)
success.default
bg-success--color-success
success.hover
bg-success-hover--color-success-hover
success.active
bg-success-active--color-success-active
success.tint
bg-success-tint--color-success-tint
success.text
text-success-foreground--color-success-text
warning.default
bg-warning--color-warning
warning.hover
bg-warning-hover--color-warning-hover
warning.active
bg-warning-active--color-warning-active
warning.tint
bg-warning-tint--color-warning-tint
warning.text
text-warning-foreground--color-warning-text
error.default
bg-error--color-error
error.hover
bg-error-hover--color-error-hover
error.active
bg-error-active--color-error-active
error.tint
bg-error-tint--color-error-tint
error.text
text-error-foreground--color-error-text
error.bg
bg-error-bg--color-error-bg
info.default
bg-info--color-info
info.hover
bg-info-hover--color-info-hover
info.active
bg-info-active--color-info-active
info.tint
bg-info-tint--color-info-tint
info.text
text-info-foreground--color-info-text
Disabled & Focus
disabled.default
bg-disabled--color-disabled
disabled.text
text-disabled-foreground--color-disabled-text
focus.ring
focus-ring--color-focus-ring
focus.ring-error
ring-error--color-focus-ring-error
Chart Colors (Chart-1~5)
chart.1
bg-chart-1--color-chart-1
chart.2
bg-chart-2--color-chart-2
chart.3
bg-chart-3--color-chart-3
chart.4
bg-chart-4--color-chart-4
chart.5
bg-chart-5--color-chart-5

CSS → Tailwind 命名ルール

--color- を除いた部分がそのままTailwindクラス名になります。

基本

--color-primarybg-primary

--color-text-*

--color-text-linktext-text-link

CSS × Tailwind 命名変換

同名

text- → text-text-*

CSSプレフィックスとTailwindユーティリティが同名

Tailwind 標準

*-text → *-foreground

Tailwindエコシステムの標準パターンに合わせたエイリアス

shadcn/ui 等が採用する開発者向けの短縮命名とは目的が異なり、Figma → コード 1:1 同期により、デザイナーと開発者が同じトークン名で会話できる命名体系です。