広告が嫌いですか? 行く 広告なし 今日

CSS Design Token Generator

開発者

ブランドカラー

Used as the palette key, e.g. --color-brand-500.

オプション

Modern outputs oklch() values; Hex outputs classic #rrggbb.
Scale palette saturation. 100 keeps the brand color's chroma.

ガイド

CSS Design Token Generator

CSS Design Token Generator

Turn a single brand hex color into a complete, opinionated CSS custom-property token system. The tool generates an 11-stop perceptually uniform palette in OKLCH space (50 through 950) and layers a semantic token system on top so you can drop the output straight into a design system or component library.

Unlike a quick chat-generated palette, every shade is computed deterministically, gamut-clamped to sRGB, and previewed live as swatches so you can see how the colors look before you copy them. Tokens are exported in modern oklch() values or classic hex, with an optional dark-mode variant ready to paste into a :root ブロック。

使用方法

  1. Pick a brand color with the color picker or paste a hex value (e.g. #464aff).
  2. Set a name prefix (default brand) — this becomes the key in --color-brand-500.
  3. Choose the output format: modern oklch() for Tailwind v4 / wide-gamut workflows, or classic hex.
  4. Toggle “Include dark mode variant” and pick a strategy (.dark class, [data-theme="dark"] attribute, or prefers-color-scheme media query).
  5. Adjust the chroma slider if you want a softer or punchier palette, then copy the generated CSS or download it as a stylesheet.

機能

  • OKLCH color math – Perceptually uniform 50-950 scale with gamut clamping so every stop stays inside sRGB.
  • Semantic token layer – Outputs roles like --color-primary, --color-surface, --color-on-surface, --color-border, --color-ringと、 --color-accent.
  • Dark mode variant – Optional second selector that swaps semantic mappings, leaving the raw palette untouched.
  • Live swatch grid – Visual preview of every stop plus an interactive light/dark UI mock so you can sanity-check contrast at a glance.
  • Modern or legacy output – Pick oklch() values or classic hex depending on your browser support target.
  • Chroma slider – Scale palette saturation from 0% (neutral grayscale) up to 150% (richer than your input color).
  • クライアントサイドのみ – Everything runs in your browser; your brand color never leaves the page.
  • コピーまたはダウンロード – One-click copy of the full :root {} block or download as a .css ファイル。

よくある質問

  1. What is OKLCH and why use it for palette generation?

    OKLCH is a polar form of the Oklab color space designed to be perceptually uniform. Equal numerical differences in lightness or chroma correspond to roughly equal perceived differences. That makes it ideal for generating palettes where each step (50, 100, 200, …) feels evenly spaced to the eye, unlike HSL, which produces uneven jumps especially in the yellow-green range.

  2. What is a design token?

    A design token is a named variable that stores a design decision — a color, a spacing value, a font size, and so on. Instead of repeating raw values like #464aff across your codebase, you reference a token like --color-primary. Tokens give designers and developers a single source of truth and make systemic changes (rebrand, theme switch, dark mode) trivial.

  3. What is the difference between a raw palette and a semantic token?

    A raw palette token names a color by its appearance and position in a scale, like --color-brand-500. A semantic token names a color by its purpose, like --color-primary or --color-on-surface. Components should consume semantic tokens so the same component renders correctly in light, dark, or any future theme — the semantic layer maps to whichever raw shade is appropriate.

  4. Why are semantic tokens better than referencing raw palette values directly?

    Semantic tokens decouple intent from implementation. If you write background: var(--color-brand-600) everywhere, switching themes means rewriting every component. If you write background: var(--color-primary), only the semantic mapping changes between themes. This is the same principle that drives Material Design 3, IBM Carbon, and shadcn/ui token systems.

  5. What does gamut clamping mean?

    sRGB — the color space most screens render — cannot represent every OKLCH coordinate. When a generated stop falls outside sRGB, its chroma is reduced until the color fits. This keeps the palette visually consistent across devices but means very saturated brand colors lose a small amount of vibrancy at extreme lightness levels.

  6. What is the on-surface naming convention?

    In a semantic system, --color-on-X names the foreground color you should use when X is the background. So --color-on-primary is the text color to use on top of --color-primary, and --color-on-surface is the body text color used on --color-surface. The pattern guarantees readable contrast pairs without making every component pick its own foreground.

広告なしで楽しみたいですか? 今すぐ広告なしで

拡張機能をインストールする

お気に入りのブラウザにIOツールを追加して、すぐにアクセスし、検索を高速化します。

に追加 Chrome拡張機能 に追加 エッジ拡張 に追加 Firefox 拡張機能 に追加 Opera 拡張機能

スコアボードが到着しました!

スコアボード ゲームを追跡する楽しい方法です。すべてのデータはブラウザに保存されます。さらに多くの機能がまもなく登場します!

ニュースコーナー 技術ハイライト付き

参加する

価値ある無料ツールの提供を継続するためにご協力ください

コーヒーを買って