Accessible Color Palette and Type Pairing With Contrast-Checked Text Pairs

Builds a brand palette with a neutral ramp and semantic colors, text and background pairs with WCAG contrast ratios, two font pairings, a type scale and CSS variables ready to paste.

You getpalette table (Token, Hex, Use), contrast table (Foreground, Background, Ratio, AA or AAA, Use), font pairings, type scale table, then CSS custom properties in a code block, and…

The prompt

Prompt
Act as a product designer who works to WCAG 2.2. Build a color palette and type system for Fernway, a trail-planning web app: grounded, adventurous, calm (example value for {brand or product and 3 adjectives}). If I have not said, ask me first: any existing brand color (hex), light mode, dark mode or both, and the platform (web, iOS, Android).

Rules:
1. Palette: primary, a neutral ramp of 9-10 steps, one accent, and semantic colors (success, warning, error, info), all in hex. Keep my brand color if I give one and build its tints and shades around it.
2. Compute the contrast ratio for every text and background pair you recommend, running code for the WCAG formula if you can. Mark each AA (4.5:1 normal text, 3:1 large text and UI parts) or AAA (7:1). Remove any pair that fails and list it separately.
3. Two font pairings (heading and body) from free web fonts, each with a reason and a system fallback stack.
4. A type scale with sizes in rem, line heights and weights.

Output format: palette table (Token, Hex, Use), contrast table (Foreground, Background, Ratio, AA or AAA, Use), font pairings, type scale table, then CSS custom properties in a code block, and a Tailwind theme config if I ask. Computed ratios can be slightly off, so check each pair in a contrast checker before shipping.

Dashed parts are example values, so the prompt runs as copied. Change them in Fill in the blanks.

Example output

At a glanceContrast ratios of Fernway text pairsWCAG ratios; 4.5:1 is the AA minimum for body text
  • Body text #1C1917 on white: 17.5:1
  • Secondary body #44403C: 9.9:1
  • Button hover white on #1F4A36: 9.9:1
  • Supporting text #57534E: 7.6:1
  • Info/links #1D4ED8: 6.7:1
  • Primary button white on #2F6B4F: 6.3:1
  • Captions #78716C: 4.8:1
  • Removed: #A8A29E on white: 2.5:1

Example for: Fernway, a trail-planning app that feels grounded, adventurous and calm. Brand color #2F6B4F, light mode first, web.

Palette

TokenHexUse
primary-50#EAF3EETinted surfaces, selected rows
primary-500#2F6B4FBrand color: buttons, links
primary-700#1F4A36Hover/pressed, dark headers
accent#E07A3FTrail markers, highlights (never as text on light)
neutral-50#FAFAF9Page background
neutral-100#F5F5F4Cards, inputs
neutral-200#E7E5E4Dividers
neutral-300#D6D3D1Borders (decorative)
neutral-400#A8A29EDisabled icons
neutral-500#78716CCaptions, meta
neutral-600#57534ESecondary text
neutral-700#44403CBody text alt
neutral-800#292524Strong UI text
neutral-900#1C1917Primary text
success#15803DSaved, route synced
warning#B45309Weather alerts
error#B91C1CForm errors
info#1D4ED8Tips, notices

Contrast (computed with WCAG relative-luminance formula)

ForegroundBackgroundRatioLevelUse
#1C1917#FFFFFF17.5:1AAABody text
#44403C#FAFAF99.9:1AAASecondary body
#57534E#FFFFFF7.6:1AAASupporting text
#78716C#FFFFFF4.8:1AACaptions
#FFFFFF#2F6B4F6.3:1AAPrimary button
#FFFFFF#1F4A369.9:1AAAButton hover
#2F6B4F#EAF3EE5.6:1AASelected tab label
#1C1917#E07A3F5.9:1AAAccent badge
#B91C1C#FFFFFF6.5:1AAError text
#15803D#FFFFFF5.0:1AASuccess text
#B45309#FFFFFF5.0:1AAWarning text
#1D4ED8#FFFFFF6.7:1AAInfo/links

Removed (fails): #A8A29E on #FFFFFF (2.5:1), #FFFFFF on #E07A3F (3.5:1, large text only, excluded for safety), #E07A3F on #FFFFFF (3.5:1).

Font pairings

  1. Fraunces + Inter: Fraunces' soft serifs feel outdoorsy and warm; Inter stays crisp at small map labels.
    Fallback: Georgia, serif / system-ui, -apple-system, "Segoe UI", sans-serif
  2. Outfit + Source Sans 3: geometric, adventurous headings with a highly legible, calm body.
    Fallback: system-ui, sans-serif / "Segoe UI", Roboto, Arial, sans-serif

Type scale (1.25 ratio)

TokenSizeLine heightWeight
display3.052rem1.1700
h12.441rem1.15700
h21.953rem1.2600
h31.563rem1.3600
body-lg1.25rem1.5400
body1rem1.6400
small0.8rem1.5500
:root {
  --color-primary-50: #EAF3EE;
  --color-primary-500: #2F6B4F;
  --color-primary-700: #1F4A36;
  --color-accent: #E07A3F;
  --color-neutral-50: #FAFAF9;
  --color-neutral-100: #F5F5F4;
  --color-neutral-200: #E7E5E4;
  --color-neutral-300: #D6D3D1;
  --color-neutral-400: #A8A29E;
  --color-neutral-500: #78716C;
  --color-neutral-600: #57534E;
  --color-neutral-700: #44403C;
  --color-neutral-800: #292524;
  --color-neutral-900: #1C1917;
  --color-success: #15803D;
  --color-warning: #B45309;
  --color-error: #B91C1C;
  --color-info: #1D4ED8;

  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-display: 3.052rem;
  --text-h1: 2.441rem;
  --text-h2: 1.953rem;
  --text-h3: 1.563rem;
  --text-body-lg: 1.25rem;
  --text-body: 1rem;
  --text-small: 0.8rem;
}

Ratios are computed and may be slightly off. Check each pair in a contrast checker before shipping.

Written by AI from this prompt. Your results will vary.

Paste into ChatGPT, Claude or Gemini with your brand color and a few words on the feel you want. Paste the CSS variables into your global stylesheet and run each pair through a contrast checker.

Keep exploring

More in Design