Örnek Kahve Co. — colour usage guide

Accessible palette v1.0 · WCAG 2.2 AA (AAA where noted) · prepared by Ali Karabüyük · tokens: accessible-color-palette-tokens.json / .css

Fictional example brand

1. Brand colours — unchanged, but with a job description

  • Brand orange#F28C28logo, illustration, large fills with dark text
  • Brand teal#2EC4B6decorative accents only
  • Brand yellow#FFD166highlight backgrounds, dark text only
  • Cream#FFF8F0section background

2. Working colours (semantic tokens, light mode)

  • action#AC5D00buttons, CTA
  • link#944F00links in text
  • text#3E312Abody text
  • text-muted#846C60secondary text
  • accent#006D65secondary button, accent headings
  • error#911B12error + ✕ icon
  • success#007F76success + ✓ icon
  • focus#00544Efocus ring outer

3. Five rules

  1. Text uses only approved pairings (table below). Never put text in brand orange, teal or yellow on white.
  2. White text needs action (orange-600, 4.86:1), not brand orange (2.45:1). On brand orange or yellow, text is on-brand (neutral-950).
  3. Never colour alone (1.4.1): every error/success carries an icon and the words “Hata:” / “Tamam:”; links in body text are underlined.
  4. Focus is always visible: 2px inner focus-inner + 3px outer focus ring, 2px offset (≥3:1 against page, section and button).
  5. Disabled ≠ low-contrast content. Disabled controls are exempt from 1.4.3, but must also be marked disabled in code.

4. UI states

default hover pressed focus secondary disabled

Hata: Kart numarası geçersiz.

Tamam: Siparişiniz alındı.

5. Approved text pairings — light mode (WCAG 1.4.3 / 1.4.6)

UseTokensRatioLevel
Body textAatext on bg12.52:1AAA
Body text on section bgAatext on bg-subtle11.88:1AAA
Secondary textAatext-muted on bg4.89:1AA
Secondary text on section bgAatext-muted on bg-subtle4.64:1AA
LinkAalink on bg6.22:1AA
Link on section bgAalink on bg-subtle5.90:1AA
Primary button labelAaon-action on action4.86:1AA
Button label (hover)Aaon-action on action-hover6.22:1AA
Button label (pressed)Aaon-action on action-pressed8.84:1AAA
Secondary button / accent headingAaaccent on bg6.22:1AA
Promo banner text on brand yellowAaon-brand on brand-yellow11.03:1AAA
Hero/badge text on unchanged brand orangeAaon-brand on brand-orange6.48:1AA
Error messageAaerror on bg8.86:1AAA
Error bannerAaerror on error-bg8.34:1AAA
Success messageAasuccess on bg4.89:1AA
Success bannerAasuccess on success-bg4.61:1AA

6. Non-text contrast — light mode (WCAG 1.4.11, focus 2.4.13)

UseTokensRatioLevel
Input border vs pageborder-input on bg3.21:1Pass (≥3:1)
Input border vs sectionborder-input on bg-subtle3.04:1Pass (≥3:1)
Button shape vs pageaction on bg4.86:1Pass (≥3:1)
Secondary button borderaccent on bg6.22:1Pass (≥3:1)
Focus ring vs page (1.4.11, 2.4.13)focus on bg8.83:1Pass (≥3:1)
Focus ring vs sectionfocus on bg-subtle8.38:1Pass (≥3:1)
Focus ring vs muted surfacefocus on surface-muted7.66:1Pass (≥3:1)
Inner focus ring vs primary buttonfocus-inner on action4.86:1Pass (≥3:1)
Outer vs inner focus ringfocus on focus-inner8.83:1Pass (≥3:1)
Error icon / field bordererror on bg8.86:1Pass (≥3:1)
Success iconsuccess on bg4.89:1Pass (≥3:1)

7. Dark mode

Body text on the dark page, with a link and secondary text.

Use (dark)TokensRatioLevel
Body textAatext on bg14.96:1AAA
Body text on section bgAatext on bg-subtle11.78:1AAA
Secondary textAatext-muted on bg8.56:1AAA
Secondary text on section bgAatext-muted on bg-subtle6.74:1AA
LinkAalink on bg8.51:1AAA
Link on section bgAalink on bg-subtle6.70:1AA
Primary button labelAaon-action on action6.36:1AA
Button label (hover)Aaon-action on action-hover8.51:1AAA
Button label (pressed)Aaon-action on action-pressed11.35:1AAA
Secondary button / accent headingAaaccent on bg8.57:1AAA
Promo banner text on brand yellowAaon-brand on brand-yellow11.03:1AAA
Hero/badge text on unchanged brand orangeAaon-brand on brand-orange6.48:1AA
Error messageAaerror on bg6.36:1AA
Error bannerAaerror on error-bg6.32:1AA
Success messageAasuccess on bg13.82:1AAA
Success bannerAasuccess on success-bg13.73:1AAA

8. Colour-vision check of status colours

Error red-800 and success teal-600 were picked from the scales to keep the largest difference under simulated protanopia, deuteranopia and tritanopia (minimum CIEDE2000 27.28, before: 11.64). Success uses the brand-teal family (bluish green) instead of a pure green — that hue shift, not lightness, does most of the work: their lightness ratio (1.81:1) is about the same as before (1.82:1). Colour is still a secondary cue — the icon and the words carry the meaning.

9. Limits

Contrast ratios do not capture font weight, size, thickness or anti-aliasing; small or thin text may need more than the minimum. CVD simulation is a model (Machado 2009, full dichromacy) and is not a substitute for testing with people. APCA values in the matrices are informative and not part of WCAG 2.2. Brand acceptance of the darker working colours is the client's decision.