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 credit for this prompt Original author: ai-prompt-library-team Original source: https://github.com/zidniryi/awesome-AI-prompt-library/blob/main/prompts/ui-ux/design-systems/design-token-based-color-type-scale.md Source collection: https://github.com/zidniryi/awesome-AI-prompt-library License: CC BY 4.0 — https://creativecommons.org/licenses/by/4.0/ Source license: https://github.com/zidniryi/awesome-AI-prompt-library/blob/main/LICENSE-CONTENT Changes: Prompt text unchanged. Extracted from the source document; title and usage guidance added by LandingPagePrompts. Keep this credit when redistributing the prompt. No creator endorsement is implied.