Skip to content
landingpageprompts

UI design · CC BY 4.0

Design color and typography tokens

Build perceptual color scales, semantic token mappings and a modular type scale.

By ai-prompt-library-team

Download prompt

Copies include creator credit and license links.

The prompt

Design a token-based color scale and type scale for a design system.

Brand primary color: {brand_primary_hex}
Base font size: {base_font_size, e.g. "16px"}
Type scale ratio: {type_scale_ratio, or "recommend one appropriate for a
[web app / marketing site / mobile app]"}
Dark mode needed: {yes_or_no}

Color scale requirements:
- Generate a 9-10 step perceptual lightness scale from the brand primary
  color (lightest to darkest), suitable for use as backgrounds, borders,
  and text at different steps — explain briefly how you generated the
  steps (e.g. adjusting lightness in HSL/OKLCH while holding hue roughly
  constant) so the scale isn't just visually guessed.
- Layer semantic tokens on top of the raw numbered scale — e.g.
  `color-primary-50` through `color-primary-900` as the raw scale, then
  `color-action-default`, `color-action-hover`, `color-action-pressed`,
  `color-text-on-primary` as semantic tokens that MAP TO specific steps in
  the raw scale, so the semantic layer can be redefined later without
  regenerating the raw scale.
- Include at minimum: a neutral/gray scale (for text, borders, backgrounds)
  and a semantic error/success/warning color, each following the same
  step-scale approach as the primary color.
- If dark mode is needed, show the specific mapping of each semantic token
  to a DIFFERENT raw scale step in dark mode (not just "invert everything"
  — e.g. a light-mode background token typically maps to a very light step,
  while its dark-mode equivalent maps to a very DARK step, not the
  lightest step of an inverted scale, which usually produces poor contrast).

Type scale requirements:
- Generate a modular scale using the given (or recommended) ratio from the
  base size, with named steps (e.g. xs, sm, base, lg, xl, 2xl...) rather
  than only numeric pixel values, so components reference semantic names.
- State the ratio used and why it fits the stated product type.

Output as: the raw color scale (hex values), the semantic token mapping
table (light and dark if applicable), and the type scale table (name,
size, suggested line-height).

Source & permission

Original prompt in Awesome AI Prompt Library ↗

ai-prompt-library-team. Licensed under Creative Commons Attribution 4.0. Read the source license.

Changes: Prompt text unchanged. Extracted from the source document; title and usage guidance added by LandingPagePrompts.

You may share and adapt this prompt, including commercially, under its license. Retain the creator credit, source and license links, and identify your changes. No creator endorsement is implied.

Browse all community prompts →