Color
The color roles every OAIT product uses, in light and dark, and the rules that keep them legible: which role goes on which ground, how states and focus are drawn, where a product may differ, and what the audit found wrong.
This page holds the rules (canonical §2). Every token's light and dark value is in the token reference, and every checked pair is in the contrast report. The binding source is canonical.md; decisions are in the decision log.
Rules at a glance
- Write role tokens only:
var(--color-…)in CSS,bg-…,text-…,border-…,fill-…in Tailwind. No hex, no Tailwind palette colors, no near-duplicates, because one hex per role is what keeps five products one family (D-COL-01). bg-primaryis the orange fill and always carriestext-on-primary. One filled orange button in the content of a view (D-COL-02, D-CAI-04).- Orange text, icons, and thin lines are
text-primary-inkorborder-primary-ink. Nevertext-primary: the fill is 2.63:1 on the page (D-COL-03). - Body text is
text-on-surface; secondary text istext-on-surface-variantat full strength, never with an opacity modifier (D-COL-11). - The edge that identifies a control is
border-outline; decorative hairlines areborder-outline-variant(D-COL-11, D-CSN-02, V-1, V-2). - Outlined and elevated cards sit on
bg-card-outlined-containerandbg-card-elevated-container(filled cards onbg-surface-container-low), overlays onbg-surface-raised, fields onbg-surface-container-lowest(D-ARC-09). - Hover and press are a state layer of the content color (8% and 12%); disabled is
on-surfaceat 12% (fills and the edges that frame a control) and 38% (labels, icons, and the check and radio boxes). No hover hexes, filters, or whole-control opacity (D-COL-05, D-CAI-06, D-ARC-02, D-ARC-33). - Status always shows an icon and words; color is never the only signal (D-COL-07, D-COL-08, D-COL-09, D-COL-10, D-BCP-25).
- Inside
bg-inverse-surface, write theinverse-*roles and re-point the focus ring (D-COL-12, D-ARC-07). - Themes switch on
<html>only. Component code never writes@media (prefers-color-scheme)ordark:color variants (D-COL-14, D-ARC-07). data-productnever themes a family product. Tamakkan sets it on its own<html>, where only the seven accent tokens change; on a family page it sits only on Tamakkan's own mark or lock-up element, so the dot keeps its violet (D-COL-15, D-BCP-14, D-ARC-30).- Charts sit only on
surface,surface-container-lowest, orcard-outlined-container(D-COL-19, V-3).
Principles
| Principle | What it means in practice | Decisions |
|---|---|---|
Orange is a fill; primary-ink is the orange text |
#f47920 makes the main action, badges, step discs, and the orange of the marks. Every orange word, icon, link, indicator, and thin line is the deeper primary-ink |
D-COL-02, D-COL-03 |
| Warm neutrals | One warm ladder from Global ID and oait (surface #fff8f5 to surface-container-highest #eae0da, text #221a15 and #52443c). Cool or violet grays retire |
D-COL-11 |
| Depth by tone before shadow | Surfaces are flat and edged by hairlines. Two shadows exist. In dark, raised surfaces get lighter, not darker | D-SEM-08, D-ARC-09 |
| Status never by color alone | Every status pairs its color with an icon and words. Selection pairs its fill with a check, a filled glyph, or a 2px edge | D-BCP-25, D-CAI-14 |
| Tokens only, measured not guessed | Contrast pairs are build assertions. A measured reason (contrast, rendering) beats preference | D-COL-23, D-ARC-01 |
| One look, named slots | Every color is shared except the named slots: the marks, Tamakkan's accent, the passport gradients, Global ID's person-type palette, Tamakkan's HBDI result palette | D-CSN-42, D-BCP-14, D-COL-15 |
Vocabulary and the traps
- Color names are Material 3 role names written
--color-<role>, used asbg-<role>,text-<role>,border-<role>,fill-<role>,stroke-<role>,outline-<role>,accent-<role>, and gradient utilities. A role named without a prefix (surface-raised) means the token--color-surface-raised(D-COL-01). - Two layers. Palette tokens (
pastel-*,cat-*,passport-*,chart-*) hold raw values that never depend on a product. Role tokens alias them (primary-containerispastel-peach). Components write the role, never its target, so an accent can move a role without repainting decoration (D-COL-01). - Aliases:
success*istertiary*;info-containerandon-info-containerare the secondary containers;focus-ringisprimary-ink;mark-accentisprimary;skeletonissurface-container-highest;skeleton-highlightissurface-container-high.infoholds its own value, asserted equal tosecondary(D-ARC-19). - Not adopted:
surface-dim,surface-bright,surface-variant, a focus state layer,static-white,primary-hover,primary-pressed, and anyband-*,snackbar-*,header-glass, orselected-rowtoken. Use the role or the recipe this page gives instead (D-COL-11, D-ARC-02, D-ARC-03, D-ARC-07, D-ARC-08, D-ARC-10, D-ARC-11).
The names are Material 3's and shadcn's; some of the meanings are not. AI tools fall into these first.
| Name | What a tool expects | What it means here | Write |
|---|---|---|---|
primary |
Material 3: the text-strength brand color. shadcn: the brand color for text and links | The orange fill only. As text it is 2.63:1 on the page | bg-primary text-on-primary for the main action; text-primary-ink for orange text |
on-primary |
White | Dark brown #331200 (6.19:1). White on the orange is 2.76:1 |
text-on-primary |
primary-ink |
(not in Material 3) | The family's one orange for text, icons, and thin lines | text-primary-ink, border-primary-ink, bg-primary-ink for tracks and fills, accent-primary-ink |
secondary |
shadcn: a quiet gray button | The Mediterranean blue for icons and small accents. In a shadcn product the utility means the quiet lavender fill | text-secondary (text-info in shadcn products); the quiet fill is bg-secondary-container |
shadcn --accent |
The brand accent | A neutral solid hover fill, surface-container-high |
Never use it to color an action |
inverse-surface |
Material 3: turns light in dark | Dark in both themes | The inverse-* roles inside it |
surface-container-lowest |
"The white card" | White in light; in dark a well below the page (#140d09 under #19120e) |
Fields, selects, and choice cards (and the dot pill and the switch thumb); never cards or overlays, which use the three raised roles |
success |
Its own green | An alias of tertiary |
success* for status; tertiary or pastel-mint for decoration |
focus-ring |
A ring utility | The ring's color (alias of primary-ink). Its width is --size-focus-ring |
Re-point --color-focus-ring on a container |
mark-accent |
A UI accent | The orange (Tamakkan: violet) inside product marks only | fill-mark-accent in inline marks |
Role table
Values switch with the theme by themselves (see Dark theme). The full list, with every usage note, is in the token reference.
Primary family
| Role | CSS | Tailwind | Light | Dark | Use |
|---|---|---|---|---|---|
primary |
--color-primary |
bg-primary |
#f47920 |
#f47920 |
The orange fill: the one filled main button, FAB, count badges, step discs, the eyebrow-pill dot and eyebrow rule, the hero underline |
on-primary |
--color-on-primary |
text-on-primary |
#331200 |
#331200 |
Label and icon on primary |
primary-container |
--color-primary-container |
bg-primary-container |
#ffdbc8 |
#5c2a08 |
Selected and current fill: selected chips and segments, the current navigation item, the fill behind avatar initials, the one primary panel |
on-primary-container |
--color-on-primary-container |
text-on-primary-container |
#331200 |
#ffdbc8 |
Text and icons on primary-container |
primary-ink |
--color-primary-ink |
text-primary-ink |
#8f4200 |
#ffb68a |
Orange text, icons, and thin lines (list below) |
inverse-primary |
--color-inverse-primary |
text-inverse-primary |
#ffb68a |
#ffb68a |
Orange text, icons, and focus ring on inverse-surface |
focus-ring |
--color-focus-ring |
(base CSS) | #8f4200 |
#ffb68a |
The :focus-visible ring color |
Secondary, tertiary, and status
| Role | CSS | Tailwind | Light | Dark | Use |
|---|---|---|---|---|---|
secondary |
--color-secondary |
text-secondary |
#3a5ba9 |
#b1c5ff |
Blue icons, icon discs, and small accents |
on-secondary |
--color-on-secondary |
text-on-secondary |
#ffffff |
#002b75 |
Text on a secondary fill |
secondary-container |
--color-secondary-container |
bg-secondary-container |
#dae2ff |
#1f438f |
The tonal button, the "Admin console" chip, lavender tiles |
on-secondary-container |
--color-on-secondary-container |
text-on-secondary-container |
#00194a |
#dae2ff |
Text and icons on secondary-container |
tertiary |
--color-tertiary |
text-tertiary |
#00694b |
#87d6b0 |
Green accents (status writes success) |
tertiary-container |
--color-tertiary-container |
bg-tertiary-container |
#a3f2cb |
#005138 |
Mint tiles and blobs (status writes success-container) |
success |
--color-success |
text-success |
#00694b |
#87d6b0 |
Success text and icons ("Active", "Verified employer", "Allowed") |
success-container |
--color-success-container |
bg-success-container |
#a3f2cb |
#005138 |
Success chips and notices, with text-on-success-container (#002115 / #a3f2cb) |
warning |
--color-warning |
text-warning |
#7a5900 |
#eec15a |
Warning and pending text and icons ("Closes in 4 days", the "Coming soon" dot) |
warning-container |
--color-warning-container |
bg-warning-container |
#ffdf9e |
#5c4300 |
Warning and pending chips and notes, with text-on-warning-container (#261a00 / #ffdf9e) |
info |
--color-info |
text-info |
#3a5ba9 |
#b1c5ff |
Information text and icons |
info-container |
--color-info-container |
bg-info-container |
#dae2ff |
#1f438f |
Information notices and chips, with text-on-info-container (#00194a / #dae2ff) |
error |
--color-error |
text-error |
#ba1a1a |
#ffb4ab |
Field error text, icon, and edge; the danger button fill; "Not allowed" verdicts |
on-error |
--color-on-error |
text-on-error |
#ffffff |
#690005 |
Label on the danger button |
error-container |
--color-error-container |
bg-error-container |
#ffdad6 |
#93000a |
Error summaries, notices, and chips, with text-on-error-container (#410002 / #ffdad6) |
on-tertiary, on-success, on-warning, and on-info exist for text on the strong fills (#ffffff in light; #003825, #003825, #402d00, #002b75 in dark).
Surfaces, text, and lines
| Role | CSS | Tailwind | Light | Dark | Use |
|---|---|---|---|---|---|
surface |
--color-surface |
bg-surface |
#fff8f5 |
#19120e |
The page, the site header, the rail, sticky bars |
surface-container-lowest |
--color-surface-container-lowest |
bg-surface-container-lowest |
#ffffff |
#140d09 |
Text fields, selects, choice cards, dot pills; the switch thumb when on |
surface-container-low |
--color-surface-container-low |
bg-surface-container-low |
#fcf1eb |
#221a15 |
Tonal panels (hero, how it works, the auth frame), filled cards |
surface-container |
--color-surface-container |
bg-surface-container |
#f6ebe5 |
#271e19 |
The phone navigation bar |
surface-container-high |
--color-surface-container-high |
bg-surface-container-high |
#f0e5df |
#322823 |
Neutral status chips and banners, organization avatars, a solid hover where a layer cannot be drawn |
surface-container-highest |
--color-surface-container-highest |
bg-surface-container-highest |
#eae0da |
#3d332d |
Tracks (switch off, slider, progress), the diverging chart midpoint. Never a border |
on-surface |
--color-on-surface |
text-on-surface |
#221a15 |
#f0dfd7 |
Body text, headings, icons |
on-surface-variant |
--color-on-surface-variant |
text-on-surface-variant |
#52443c |
#d8c2b8 |
Secondary text, helpers, placeholders, idle navigation |
outline |
--color-outline |
border-outline |
#85736a |
#a08d83 |
The edge that identifies a control |
outline-variant |
--color-outline-variant |
border-outline-variant |
#d8c2b8 |
#52443c |
Decorative hairlines and dividers |
scrim |
--color-scrim |
bg-scrim |
#00000052 |
#00000052 |
Black at 32% behind modal dialogs and sheets |
Cards, overlays, loading, inverse, and marks
| Role | CSS | Tailwind | Light | Dark | Use |
|---|---|---|---|---|---|
card-outlined-container |
--color-card-outlined-container |
bg-card-outlined-container |
#ffffff |
#19120e |
Outlined cards, table regions, platform tiles at rest |
card-elevated-container |
--color-card-elevated-container |
bg-card-elevated-container |
#ffffff |
#221a15 |
The one elevated card of a view; floating form cards |
surface-raised |
--color-surface-raised |
bg-surface-raised |
#ffffff |
#322823 |
Dialogs, sheets, menus, popovers, listboxes |
skeleton |
--color-skeleton |
bg-skeleton |
#eae0da |
#3d332d |
Skeleton blocks |
skeleton-highlight |
--color-skeleton-highlight |
via-skeleton-highlight |
#f0e5df |
#322823 |
The band that sweeps across skeleton blocks; never a fill on its own |
inverse-surface |
--color-inverse-surface |
bg-inverse-surface |
#382e29 |
#2b211c |
Dark bands, snackbars, plain tooltips, the station busy overlay, the camera viewport |
inverse-on-surface |
--color-inverse-on-surface |
text-inverse-on-surface |
#ffede5 |
#ffede5 |
Text and icons on inverse-surface |
inverse-on-surface-variant |
--color-inverse-on-surface-variant |
text-inverse-on-surface-variant |
#d8c2b8 |
#d8c2b8 |
Secondary text, and control borders, on inverse-surface |
mark-ink |
--color-mark-ink |
fill-mark-ink |
#4c4c4d |
#ffffff |
The neutral strokes of an inline product mark |
mark-accent |
--color-mark-accent |
fill-mark-accent |
#f47920 |
#f47920 |
The accent of an inline mark (alias of primary) |
Primary and the ink
Use primary only as a fill, and only for these:
- the one filled main button of a view, the FAB, count badges, numbered step discs;
- decoration: the eyebrow-pill dot, the 32×2px eyebrow rule on marketing section headers, the hand-drawn underline under the hero's accent beat;
- the orange of the marks, through
mark-accent(D-COL-02, D-ARC-27).
Use primary-ink for every orange that must be read or seen as a state: links, outlined and text button labels, eyebrows, the hero's second beat, the selected tab and its 3px indicator, the header's current-page bar, the 2px edge of a selected choice card, checkbox and radio accents, the switch track when on and the tick on its thumb, slider and progress fills, spinner arcs (a spinner inside a button takes its label color), the focused field's border, the focus ring. It holds 4.5:1 or more on every surface, container, and pastel at rest (lowest 5.45:1; 5.44:1 under the Tamakkan accent) and under an 8% hover layer (4.70:1 light, 4.53:1 dark), which no other orange does (D-COL-03).
- Never write
text-primary,border-primary, oraccent-primaryfor text or a thin line. As a graphic the orange is 2.63:1 on the page and 2.13:1 on asurface-container-highesttrack (D-COL-02, D-CSN-28). - Never add
[data-tint]or a second orange. One ink passes on every tint, so the swap and its forgotten-swap failures retire withprimary-ink-on-tint(D-COL-03). primary-container(peach) is the selected and current fill, always withon-primary-containerand a non-color cue.inverse-primary(#ffb68a) is the orange oninverse-surface: 7.74:1 light, 9.21:1 dark (D-COL-04, D-CAI-14, D-ARC-32).- A switch that is on draws its track in
primary-inkand its thumb insurface-container-lowest(7.13:1 light, 11.28:1 dark); aprimarytrack would be 2.63:1 (D-ARC-11).
Product note (Global ID): its spec §5.2 still fixes #b05717 as the ink, with #9c4c13 under [data-tint] (ruling R33), and that spec binds inside the product. Global ID switches to primary-ink #8f4200 / #ffb68a only after §5.2 is amended and a ledger ruling retires R33; the drift report (Global ID, "Before anything changes") lists the steps (canonical §2.2, §16).
Secondary, tertiary, and status
secondaryis the Mediterranean blue for icons, icon discs, and small accents beside the orange, onsurface,surface-container-lowest,surface-container-low, and the two card containers.secondary-container(lavender) is the tonal button and the info fill. Never use the blue as a large fill that competes with the one orange action (D-COL-06).- Each status has a strong ink, an on-color, a container, and an on-container:
success(the cedartertiaryvalues),warning(the sand values),info(the blue values),error. Status inks hold 4.5:1 on every surface up tosurface-container-highest, the card containers,surface-raised, and their own container (D-COL-07, D-COL-08, D-COL-09, D-COL-10, V-6). - Status UI writes the status names; decoration writes
tertiary,pastel-mint, orpastel-sand. The namesandis retired (D-COL-08). - Every status shows an icon and words. Peach and burgundy fills never carry status, because they sit within ΔE 2.0 to 2.2 of
error-container(D-COL-10).
| Status | Ink | Container | Icon (FILL 1) | Examples (EN · AR · FR) |
|---|---|---|---|---|
| Success, active, allowed | text-success |
bg-success-container text-on-success-container |
check_circle |
"Active" · "نشط" · "Actif"; "Allowed" · "مسموح" · "Autorisé"; "Verified employer" · "جهة توظيف موثّقة" |
| Warning, pending, soon | text-warning |
bg-warning-container text-on-warning-container |
warning, or the message's own schedule, mail, link_off |
"Invited" · "مدعو" · "Invité"; "Coming soon" · "قريبًا" · "Bientôt"; "Closes in 4 days" · "تُغلق بعد 4 أيام" |
| Information | text-info |
bg-info-container text-on-info-container |
info |
The guest-verification and passkey notices (Global ID) |
| Error, not allowed | text-error |
bg-error-container text-on-error-container |
error, or block for a suspended account |
"Suspended" · "موقوف" · "Suspendu"; "Not allowed" · "غير مسموح" · "Non autorisé" |
| Neutral | text-on-surface |
bg-surface-container-high text-on-surface |
info in banners; event_busy for an expired account |
"Expired" · "منتهٍ" · "Expiré" |
Global ID's statuses map as canonical §10.9 sets them: active success + check_circle, invited warning + mail, pending warning + schedule, suspended error + block, expired neutral + event_busy, "Coming soon" warning + schedule. Links inside a status notice take the notice's on-color with an underline, never primary-ink (canonical §10.22). The banner, chip, and status indicator pages hold the components.
Surfaces, text, and lines
- The light ladder runs
surface(the page) →surface-container-lowest(white) →-low→surface-container→-high→-highest. Pick the step from the table above; never invent an in-between tint (D-COL-11). on-surfaceis for body text, headings, and icons;on-surface-variantfor secondary text, helpers, placeholders, and idle navigation, always at full strength. On every surface, card,surface-raised, pastel, andprimary-containerthey hold 13.14:1 and 7.16:1 or more in light, 7.19:1 and 5.46:1 or more in dark (D-COL-11).- On glass bars (
bg-surface/80 backdrop-blur-xl) write onlyon-surfaceandon-surface-varianttext; orange appears there only as non-text (the current-page bar, the ring) or on an opaque fill (D-SEM-12).
Lines carry two different jobs, and the difference is contrast:
| Line | Weight and role | Where | Why |
|---|---|---|---|
| Control edge | 1px outline |
Text fields, selects, outlined buttons, checkbox and radio boxes, segmented groups; the hover edge of a clickable outlined card; the snackbar's edge | The edge identifies the control, so it needs 3:1. outline holds 3.47:1 or more on every surface, card, surface-raised, and primary-container (D-COL-11, D-SEM-10, V-1) |
| Hairline | 1px outline-variant |
Card and table edges, dividers, list and menu rules, the sticky bar's top edge, unselected chips, the outlined icon button, platform tiles | About 1.6:1: decorative. It may be the only edge of a control that a visible label, icon, or mark identifies (D-CSN-02, D-ARC-13, V-2) |
| Switch track, off | 2px outline |
Switch | (canonical §6.2) |
| Selected | 2px primary-ink on primary-container, drawn so nothing shifts: a 1px border plus a 1px inset shadow on the choice card, a 2px inset shadow on the chosen platform tile |
Selected choice card, selected avatar, the chosen platform tile | 5.50:1 light, 6.88:1 dark against its fill, and 4.5:1 or more against every surface and container around it (D-ARC-32, canonical §10.7) |
| Invalid | 1px error, 2px when focused |
Invalid fields, with an icon and words | (D-SEM-10) |
| Placeholder | 1px dashed outline-variant |
Empty states, "Coming soon" cards; the words carry the meaning | (D-CSN-06) |
| Indicator | 3px primary-ink |
The tab indicator, the header's current-page bar | (canonical §6.2) |
- Never let
outline-variantbe the only edge of a field, a checkbox or radio box, an outlined button, or a segmented group (V-2). - Outlined controls sit on surfaces, cards,
surface-raised, andprimary-container. Never put them on pastels or status containers, where the darkoutlinefalls to 2.93–2.97:1. There, use a filled, tonal, or text control, or put the control on asurface-container-lowestchoice card (V-1). - Inside
inverse-surface, control borders areborder-inverse-on-surface-variant(D-COL-12). - No border uses
surface-container-highest, and no hairline uses an alpha variant (D-COL-11, D-CSN-02). scrim(black at 32%,bg-scrim) sits behind modal dialogs and sheets in both themes; a tap on it closes them (D-COL-11).
Cards, overlays, and loading
surface-container-lowest is white in light and #140d09 in dark, a well below the #19120e page. A well is right for fields and wrong for anything that should rise, so cards and overlays use three raised roles, aliases with no new hex (D-ARC-09).
| Role | Light | Dark | Use | Recipe |
|---|---|---|---|---|
card-outlined-container |
white | the page #19120e |
Outlined cards, table regions, platform tiles at rest; in dark the edge carries the card | bg-card-outlined-container border border-outline-variant |
card-elevated-container |
white | #221a15 |
The one elevated card of a view; floating form cards (sign-in, register, contact) | bg-card-elevated-container border border-transparent shadow-elevation-1 |
surface-raised |
white | #322823 |
Dialogs, bottom and side sheets, the phone menu sheet, menus, popovers, listboxes | bg-surface-raised shadow-elevation-3, a 1px border, the scrim when modal |
skeleton / skeleton-highlight |
#eae0da / #f0e5df |
#3d332d / #322823 |
Skeleton blocks and their sweep; decorative (1.30:1 on white) | The region carries [aria-busy="true"] and words say what is loading |
- Keep
surface-container-lowestas the fill of text fields, selects, and choice cards (D-ARC-09). - Write the header glass as
bg-surface/80 backdrop-blur-xland a selected table row asbg-primary-container/30(8.64:1 foron-surface-varianton it). These are recipes, not tokens, so they follow the accent slot where a literal would not (D-ARC-10). - Shadows have one value in both themes. In dark, depth comes from
card-elevated-containerandsurface-raised, which are lighter than the page (D-SEM-08). The elevation page owns the levels. - The skeleton sweep is
linear-gradient(90deg, var(--color-skeleton), var(--color-skeleton-highlight), var(--color-skeleton))atbackground-size: 220% 100%withanimate-skeleton; see skeleton (D-CSN-29, D-ARC-10).
Inverse roles
inverse-surfacestays dark in the dark theme, unlike Material 3, so a dark band never turns into a bright block on a dark page. Use it for the inverse band (one per page), snackbars, plain tooltips, the station busy overlay, and the camera viewport (D-COL-12).- Inside it, write
inverse-on-surface(text, 11.63:1 light, 13.83:1 dark),inverse-on-surface-variant(secondary text and control borders, 7.75:1 and 9.22:1), andinverse-primary(eyebrows, links, the action, the ring) explicitly. There is no subtree theme switch; a dark subtree would repaint the band as the page color (D-ARC-07). - Re-point the ring on the band or snackbar:
--color-focus-ring: var(--color-inverse-primary). A ring left onprimary-inkis 1.85:1 on the light inverse surface (canonical §2.8). - The filled button stays
bg-primary text-on-primaryinside the band (canonical §10.11). - In dark,
inverse-surfacesits only 1.18:1 from the page, so snackbars carryshadow-elevation-3and a 1pxoutlineborder in both themes (5.85:1 against the dark page) (D-ARC-08).
<!-- Color classes only; the panel page gives the radius and padding -->
<section class="bg-inverse-surface text-inverse-on-surface [--color-focus-ring:var(--color-inverse-primary)]">
<p class="text-eyebrow uppercase text-inverse-primary [&:lang(ar)]:normal-case">Responsible AI</p>
<h2 class="text-hero-md">Responsible by default.</h2>
<p class="text-lead max-w-measure text-inverse-on-surface-variant">Every project follows the same rules, whatever its size.</p>
</section>The same band on oait.app's Arabic page reads "الذكاء الاصطناعي المسؤول", "المسؤولية أولًا، دائمًا.", and "يتبع كل مشروع القواعد نفسها، مهما كان حجمه."; the colors do not change with the language. The panel, CTA band, snackbar, and tooltip pages hold the components.
State layers and disabled
Hover and press never change the fill's hex. They draw a layer of the content color (currentColor) over the control, so one mechanism works for every fill and every accent: dark brown on orange darkens it, white on violet lightens it (D-COL-05, D-ARC-02).
| State | What changes | Tokens | Tailwind |
|---|---|---|---|
| Hover | A ::before of currentColor at 8%, on devices that hover |
--opacity-state-hover (0.08) |
hover:before:opacity-(--opacity-state-hover) |
| Pressed | The layer at 12%, with no transition | --opacity-state-pressed (0.12) |
active:before:opacity-(--opacity-state-pressed) active:before:duration-0 |
| Dragged | The layer at 16% | --opacity-state-dragged (0.16) |
(component code) |
| Focus-visible | The ring only; there is no focus layer | --color-focus-ring, --size-focus-ring, --size-focus-offset |
(base CSS) |
| Selected, checked, current | primary-container fill, on-primary-container content, plus a check, a filled glyph, the native indicator, or a 2px primary-ink edge |
(roles) | bg-primary-container text-on-primary-container |
| Disabled | The fill of filled, tonal, danger, and on-art buttons becomes on-surface at 12%; labels, icons, and the drawn checkbox and radio boxes on-surface at 38%; the edges of outlined buttons, chips, fields, and choice cards on-surface at 12%, and fields drop their fill; a switch's track takes 12% and its thumb 38%; no layer |
--opacity-state-disabled-container (0.12), --opacity-state-disabled-content (0.38) |
disabled:bg-on-surface/12 disabled:text-on-surface/38; outlined controls disabled:border-on-surface/12 disabled:bg-transparent |
| Invalid | 1px error edge (2px focused), error text, and an error icon |
(roles) | border-error text-error |
| Loading | Colors and focus stay; [aria-busy="true"] with [aria-disabled="true"], a spinner, and a label ending in "…" ("Sending…") |
(roles) | (component code) |
/* .my-control stands for any interactive surface with a 1px border; the oait-ui.css components already draw this layer.
inset: -1px makes the layer cover the border box; a borderless row writes inset: 0. */
.my-control { position: relative; isolation: isolate; border: 1px solid transparent; }
.my-control::before {
content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
background: currentColor; opacity: var(--oa-state, 0); pointer-events: none;
transition: opacity var(--duration-short-3) var(--ease-standard);
}
@media (hover: hover) { .my-control:hover { --oa-state: var(--opacity-state-hover); } }
.my-control:active { --oa-state: var(--opacity-state-pressed); }
.my-control:active::before { transition-duration: 0ms; }
.my-control:disabled, .my-control[aria-disabled="true"] { --oa-state: 0; }
/* Every disabled control: labels and icons at 38% */
.my-control:disabled {
color: color-mix(in srgb, var(--color-on-surface) calc(var(--opacity-state-disabled-content) * 100%), transparent);
}
/* Filled, tonal, danger, and on-art buttons: the fill at 12% */
.my-control--filled:disabled {
background-color: color-mix(in srgb, var(--color-on-surface) calc(var(--opacity-state-disabled-container) * 100%), transparent);
}
/* Outlined buttons, chips, fields, and choice cards: the edge at 12%, no fill */
.my-control--outlined:disabled {
border-color: color-mix(in srgb, var(--color-on-surface) calc(var(--opacity-state-disabled-container) * 100%), transparent);
background-color: transparent;
}Tailwind writes the same layer as before:pointer-events-none before:absolute before:-inset-px before:-z-1 before:rounded-[inherit] before:bg-current before:opacity-0 before:transition-opacity before:duration-short-3 before:ease-standard before:content-[''] hover:before:opacity-(--opacity-state-hover) active:before:opacity-(--opacity-state-pressed) active:before:duration-0 disabled:before:opacity-0 aria-disabled:before:opacity-0 on a relative isolate control, so the layer covers the 1px border (hover shows no lighter rim), sits behind the label, and stays off while the control is disabled. A borderless row writes before:inset-0 instead.
- Edges that frame a control (outlined buttons, chips, fields, choice cards, the switch track) take the 12% container mix; the checkbox and radio boxes are the control's own mark and take the 38% content mix with its label. This is what canonical §10.1 (outlined
disabled:border-on-surface/12) and §10.4 (fields: edge 12%, content 38%, no fill) set for the components, and what the reference CSS does (D-CAI-06, D-ARC-33). - Never draw hover with a darker hex, a brightness filter, a shadow, or a transform, and never set
opacityon a whole control. Nothing lifts, scales, or glows (D-COL-05, D-ARC-33, D-SEM-15). - Where a pseudo-element cannot be used (shadcn class strings), mix the label color into the fill:
hover:bg-[color-mix(in_srgb,var(--color-on-primary)_8%,var(--color-primary))], and 12% for pressed. Email buttons have no hover (D-ARC-03). - Text links take no layer; their hover thickens the underline (
hover:decoration-2). - Labels stay legible on the layer: the orange button's label is 6.19:1 at rest, 5.47:1 hovered, and 5.08:1 pressed; the tonal button's 13.17, 11.29, and 10.37:1; the danger button's 6.46, 5.81, and 5.42:1; Tamakkan's violet 5.70, 5.00, and 4.60:1 (D-COL-05, D-COL-15).
- Use the native disabled attribute, or
[aria-disabled="true"]for a control that must stay focusable, and use it rarely: never to signal invalid input. Disabled content is exempt from contrast (2.25:1 light, 2.85:1 dark) (D-COL-05, canonical §10.0). - The motion page owns the timing; the button page shows every variant's state.
Focus-ring color
The ring is one geometry everywhere: outline: var(--size-focus-ring) solid var(--color-focus-ring); outline-offset: var(--size-focus-offset) (3px, 2px outside the edge), or --size-focus-inset (−4px; .oa-focus-inset in the reference CSS) inside containers that clip (D-ARC-06, D-SEM-11). Only its color changes, and only by context:
| Context | Set on the container | Lowest contrast |
|---|---|---|
| Every surface, container, and pastel | nothing (--color-focus-ring is primary-ink) |
5.45:1 (Tamakkan 5.44:1) |
| Inverse band, snackbar | --color-focus-ring: var(--color-inverse-primary) |
7.74:1 (Tamakkan 7.73:1) |
| On an orange fill (a focusable element drawn inside it) | --color-focus-ring: var(--color-on-primary) |
6.19:1 (Tamakkan's violet fill 5.70:1) |
| Card and passport art | --color-focus-ring: var(--color-on-card-art) |
3.23:1 |
| The gold Global Jobs passport | --color-focus-ring: var(--color-on-passport-jobs) |
5.68:1 (white is 1.33:1 on its light end) |
- Re-point on the container, never per element, and never change the geometry. In Tailwind, put the arbitrary property on the container:
[--color-focus-ring:var(--color-inverse-primary)](D-COL-20, D-ARC-07, V-4). - A ring that is not re-pointed fails:
primary-inkis 1.85:1 on the light inverse surface and 2.58:1 on the orange fill (canonical §2.8). - The context is the ground the ring is drawn on. The filled button and the FAB keep the ring of the ground they sit on, because their ring lies 2px outside the fill; re-pointed to
on-primaryit would be 1.08:1 against the dark page (D-COL-20). - Over photos, video, or multi-stop art without a context color, add the halo:
.oa-focus-haloin the reference CSS,box-shadow: 0 0 0 2px var(--color-surface)while focused (canonical §6.3). - The "Sign in with Global ID" kit keeps fixed portable colors: its next release draws the family ring in
#8f4200(#ffb68aon a dark host) (C-6; see Sign in with Global ID). - The accessibility page owns the ring's geometry and its tests.
Dark theme
Every color token has a dark value: oait's shipped dark set, completed from Games' stage (the error family) and Material Color Utilities (D-COL-14).
On <html> |
Result |
|---|---|
| nothing | Light, or dark when the system setting is dark |
data-theme="light" or class light |
Always light |
data-theme="dark" or class dark |
Always dark |
<html lang="en" dir="ltr" data-theme="light"> <!-- a product before its dark review -->
<html lang="en" dir="ltr"> <!-- follows the system, as oait.app does -->
<html lang="en" dir="ltr" data-theme="dark"> <!-- the Global Games projector stage page -->- Switch themes on
<html>only. A subtree never changes theme (D-ARC-07). - Component code never writes
@media (prefers-color-scheme), theme selectors, ordark:color variants: the tokens switch by themselves. Tailwind's dark variant intailwind.cssmatches only an explicitdata-theme="dark"or.dark, never the system setting (canonical §0.5). - The orange fill stays
#f47920with its#331200label in dark: 6.70:1 against the page, and the label stays 6.19:1 (D-COL-14). - Card art, passport cards, and categorical gradients do not change with the theme; neither do shadows (D-COL-14, D-SEM-08).
- In dark,
surface-container-lowestsits below the page andinverse-surfacesits 1.18:1 from it. That is why cards and overlays use the raised roles and snackbars carry an edge (D-ARC-08, D-ARC-09). - The manifest's
theme_colorandbackground_colorare the lightsurface(#fff8f5), never orange or violet.<meta name="theme-color" content="#fff8f5">gets a dark twin, the darksurface, only in products that ship dark:<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#19120e">. Meta tags cannot read CSS variables, so these are the one place the twosurfacevalues are written as hex (canonical §1.6, D-BCP-11).
| Product | Today | Under the default |
|---|---|---|
| oait.app | Light and dark by the system setting | Follows the system now |
| Global ID | Light only | data-theme="light" until its dark review passes (ID-2.38) |
| Global Jobs | Light, with 18 leftover dark blocks | data-theme="light"; the leftovers go (JB-2.27) |
| Global Games | Light; a separate --d-* set on the stage |
Light; the stage page sets data-theme="dark" (GG-2.06) |
| Tamakkan | Landing light; app light and violet-gray dark (page #14101c) |
The family themes with the accent slot; the page becomes #19120e (TK-2.04) |
A product's dark review is its own; the sources name it but give no checklist. The checks that follow from the rules on this page: no hex anywhere; cards on the card roles and overlays on surface-raised, never on surface-container-lowest; snackbars with their outline edge; inline marks in mark-ink; charts only on the chart grounds; no outlined control on a pastel or status container. The theme control (System, Light, Dark in settings, and the header's dark_mode icon button) is on the theme toggle page.
The product accent slot
An endorsed brand, a product with its own domain and its own mark, may override exactly seven tokens, through data-product="<id>" on the <html> of its own pages. Today only Tamakkan has a slot (D-COL-15, D-BCP-14).
data-productnever themes a family product. oait.app and the family products ("Global …") never set it on a page, a section, or their own content, and never add an action color (canonical §2.10, §15).- Its one use on a family page is on an endorsed brand's own mark or lock-up element, such as the Tamakkan mark in oait.app's platform strip or footer. The attribute sits on that mark's
<svg>, or on the lock-up's link so the wordmark's full stop follows too; the mark's dot keeps the brand's color, and nothing outside that element changes (D-ARC-30). - On a lock-up link the attribute also draws that link's focus ring in Tamakkan's ink, in place of any ring its container re-points. That ring holds 5.44:1 or more on every surface, container, and pastel, but in the light theme it measures 1.86:1 on the inverse band and 1.22:1 on card art, so keep such links out of both (D-COL-20).
| Token | Family light | Family dark | Tamakkan light | Tamakkan dark |
|---|---|---|---|---|
primary |
#f47920 |
#f47920 |
#7c3aed |
#7c3aed |
on-primary |
#331200 |
#331200 |
#ffffff |
#ffffff |
primary-container |
#ffdbc8 |
#5c2a08 |
#f1ebfd |
#2d2249 |
on-primary-container |
#331200 |
#ffdbc8 |
#4c1d95 |
#cdb9fd |
primary-ink |
#8f4200 |
#ffb68a |
#6d28d9 |
#d2bbff |
inverse-primary |
#ffb68a |
#ffb68a |
#d2bbff |
#d2bbff |
focus-ring |
#8f4200 |
#ffb68a |
#6d28d9 |
#d2bbff |
<!-- Tamakkan's own pages: the attribute themes the whole page -->
<html lang="ar" dir="rtl" data-product="tamakkan">
<!-- A family page (oait.app's platform strip or footer): only Tamakkan's own mark carries it, so only its dot turns violet -->
<svg class="oa-mark oa-mark--sm" data-product="tamakkan" viewBox="180 180 720 720" width="32" height="32" aria-hidden="true" focusable="false">
<path fill="var(--color-mark-ink)" d="…"/>
<path fill="var(--color-mark-accent)" d="…"/>
</svg>- What follows the slot: every component and recipe that reads these roles (the filled button, links, selected states, the ring,
bg-primary-container/30rows) andmark-accent, which the build declares again inside the product block, so the violet dot follows wherever the attribute sits: on Tamakkan's<html>, or on its mark alone on a family page (D-ARC-30). - Never override neutrals, inverse roles, the scrim, status,
secondary,tertiary,mark-ink, the opacities, or the pastel, categorical, passport, and chart colors.chart-seq-*keeps raw orange values for that reason: an accent never recolors data (D-COL-15, D-COL-19). - Tamakkan's values are its own: the
#7c3aedfill with white (5.70:1; 5.00:1 hovered, 4.60:1 pressed), the#6d28d9ink, the#f1ebfd/#4c1d95tint (9.41:1), and its dark twin#2d2249/#cdb9fd(8.32:1). Its dark ink is#d2bbffbecause its old#a78bfafalls to 3.42:1 on dark pastels (D-COL-15). - The on-art button is a family-only variant: under the accent
on-primaryis white, so its label on the white fill would be 1:1. Endorsed brands use the filled button on art (5.70:1) (D-ARC-12). - Never combine
shadcn.csswithdata-product(see shadcn/ui bridge) (V-5). - A family product keeps its identity in its slots, not in a second action color. Global Games' forest
#002117CTAs and bands and its peach#f4dfd2header band retire: the filledprimarybutton, the inverse band, and the site header onsurfacereplace them (D-COL-16, D-CSN-10).
Pastels
Four pastels, each with its on-color. They are also the values behind the role containers: primary-container is pastel-peach, secondary-container and info-container are pastel-lavender, tertiary-container and success-container are pastel-mint, warning-container is pastel-sand (D-COL-17).
| Pastel | Tailwind | Light (fill / on) | Dark (fill / on) |
|---|---|---|---|
pastel-peach |
bg-pastel-peach text-on-pastel-peach |
#ffdbc8 / #331200 |
#5c2a08 / #ffdbc8 |
pastel-lavender |
bg-pastel-lavender text-on-pastel-lavender |
#dae2ff / #00194a |
#1f438f / #dae2ff |
pastel-mint |
bg-pastel-mint text-on-pastel-mint |
#a3f2cb / #002115 |
#005138 / #a3f2cb |
pastel-sand |
bg-pastel-sand text-on-pastel-sand |
#ffdf9e / #261a00 |
#5c4300 / #ffdf9e |
- Pastels may decorate: icon tiles (cycle peach → lavender → mint → sand so no two neighbors match), soft blobs at
--opacity-decor(0.8) or--opacity-decor-soft(0.7, shapes of 224px and up), avatar backgrounds, category chips, tonal cards, quiz options (D-COL-17, D-ARC-27, D-BCP-37). - Decoration writes the pastel; components that mean something write the role. A selected chip is
bg-primary-container, a decorative peach tile isbg-pastel-peach, so Tamakkan's accent moves the first and not the second (D-COL-01). - Never use a pastel as a text color, and never let one carry status on its own: status uses the status containers with an icon and words (D-COL-17).
- Text on a pastel is its own on-color or
on-surface. Where a pastel shape sits behind other content,on-surface-variantandprimary-inkalso hold 4.5:1 on it, so the build checks them there too; no other text role is checked on a pastel (D-COL-17, V-6). - Never put outlined controls on a pastel (V-1).
- Lilac, sky, lemon, pink, and the
#bfebd8mint are retired as near-duplicates (pink sits 2.14 fromerror-container) (D-COL-17).
Categorical colors: person types
Eight hues, each a theme-invariant card-art gradient (-from, -mid, -to) and a chip pair (cat-<hue>-container, on-cat-<hue>-container) with a dark value. Global ID binds them to person types, and any product that shows a person type uses them, always with the type's label and icon, so a person has one color everywhere (D-COL-18).
| Hue | Person type (EN · AR · FR) | Icon (Global ID) | Chip | Chip light (fill / text) | Chip dark (fill / text) |
|---|---|---|---|---|---|
| orange | Student · طالب · Étudiant | school |
bg-cat-orange-container text-on-cat-orange-container |
#ffe9dc / #3d1600 |
#783100 / #ffe9dc |
| blue | Faculty · عضو هيئة التدريس · Enseignant | menu_book |
bg-cat-blue-container text-on-cat-blue-container |
#dce5ff / #0b2560 |
#1e4390 / #dce5ff |
| green | Staff · موظف · Personnel | work |
bg-cat-green-container text-on-cat-green-container |
#ddf3e7 / #00321f |
#005139 / #ddf3e7 |
| plum | Administrator · إداري · Administrateur | admin_panel_settings |
bg-cat-plum-container text-on-cat-plum-container |
#f3e2fa / #3b1350 |
#672b83 / #f3e2fa |
| teal | Security · أمن · Sécurité | shield_person |
bg-cat-teal-container text-on-cat-teal-container |
#d6eef3 / #062f38 |
#004e5d / #d6eef3 |
| indigo | Guest · ضيف · Invité | confirmation_number |
bg-cat-indigo-container text-on-cat-indigo-container |
#e4e1ff / #211c5c |
#413a92 / #e4e1ff |
| burgundy | Alumni · خريج · Diplômé | workspace_premium |
bg-cat-burgundy-container text-on-cat-burgundy-container |
#ffe0e6 / #4a0f1d |
#7f2445 / #ffe0e6 |
| slate | Contractor · متعاقد · Prestataire | construction |
bg-cat-slate-container text-on-cat-slate-container |
#e3e7ee / #1e242c |
#3e4755 / #e3e7ee |
| Hue | -from (0%) |
-mid (58%) |
-to (100%) |
|---|---|---|---|
| orange | #5c2100 |
#a84800 |
#e86a12 |
| blue | #102c66 |
#3a5ba9 |
#5277c9 |
| green | #003d2b |
#00694b |
#14876a |
| plum | #45195a |
#7a3d96 |
#9657b3 |
| teal | #0b3440 |
#1b5e6e |
#2a7d90 |
| indigo | #2b2766 |
#5650a8 |
#7069c4 |
| burgundy | #55122a |
#8e3050 |
#ad4a69 |
| slate | #262b33 |
#46505e |
#5f6b7d |
- Text on the gradients is
on-card-art(white): 4.5:1 or more on every-midstop (lowest 5.85:1), 3:1 or more on every-tostop (lowest 3.23:1), so only text of 24px and up, icons, and the ring sit toward the light end (D-COL-18, canonical §2.13). - Chips hold 11.5:1 or more in light and 7.3:1 or more in dark. The faculty and guest tints sit close to
pastel-lavenderand the alumni tint close toerror-container; that is why every person-type chip carries its label and icon (D-COL-18). - Never use a categorical color for status; categorical palettes are data colors (D-BCP-14).
- Product note (Global ID): the icons above, and the card glows, live in
src/lib/card-themes.tsas card art. Migration: a unit test asserts its gradient and back-tint values equal to thecat-*tokens, or the card readsvar(--color-cat-*)(ID-2.09). See ID card.
Platform passport
The passport card is the one place a product's identity color appears: passport cards, the app switchers, and the passport card on the family's social image (D-COL-21, D-BCP-14, D-BCP-38).
| Product | Gradient tokens | -from / -mid / -to |
Text |
|---|---|---|---|
| Global ID | cat-orange-* |
#5c2100 / #a84800 / #e86a12 |
on-card-art |
| Global Security | passport-security-* |
#221a15 / #443127 / #70442b |
on-card-art |
| Global Games | passport-games-* |
#2c2049 / #51386d / #80556e |
on-card-art |
| Global Jobs | passport-jobs-* |
#f7de94 / #d9b25a / #b98e36 |
on-passport-jobs (#261a00, 5.68:1 or more) |
| Tamakkan | passport-tamakkan-* |
#2b211c / #52443c / #85736a |
on-card-art |
| Global Tasks, Events, Tests | cat-blue-*, cat-burgundy-*, cat-green-* |
(the categorical values) | on-card-art |
- Text sits on the first 58% of the gradient. The gold Jobs card is the only dark-ink passport (canonical §9).
- The mark ink follows the ground: white on dark passport cards, gray on the gold Jobs card. A dark ground re-points
--color-mark-ink: var(--color-on-card-art)(D-BCP-06). - Passport colors never leave the passport card (on passport cards, app switchers, and the social image). See passport card and platform strip.
Gradients
Gradients are art only (D-COL-21).
- Allowed: categorical and passport cards; card-art details (sheen, guilloche, chip, one holo seal, the card glows); Global ID's pass panel, drawn at 160° from
cat-orange-from(0%) tocat-orange-mid(60% and 100%), which keeps its white text at 5.85:1 or more (its own two stops wait for tokens in 1.1; see QR pass); the stage's ambient glow; a decorative brand-triad line of 4px or less,aria-hidden. - Never on buttons, chips, text, or status, and never as a page wash or haze behind content. Blobs are flat pastels.
- Every card gradient runs 135° (225° in right-to-left pages) with stops at 0, 58, and 100%.
background-image: linear-gradient(135deg, var(--color-cat-orange-from) 0%, var(--color-cat-orange-mid) 58%, var(--color-cat-orange-to) 100%);
/* Right to left: the same stops at 225deg */Tailwind: bg-linear-135/srgb from-cat-orange-from from-0% via-cat-orange-mid via-58% to-cat-orange-to to-100% rtl:bg-linear-225/srgb (the /srgb keeps Tailwind's interpolation equal to the CSS above).
Charts
Series take chart-1 … chart-8 in order. The palette uses only family hues, alternates lightness between neighbors, and passes a color-vision check in both themes (D-COL-19).
| Slot | Hue | Light | Dark | Tailwind |
|---|---|---|---|---|
chart-1 |
orange | #e86a12 |
#e86a12 |
fill-chart-1, stroke-chart-1, bg-chart-1 |
chart-2 |
blue | #3a5ba9 |
#5277c9 |
fill-chart-2 |
chart-3 |
green | #21956e |
#34a27b |
fill-chart-3 |
chart-4 |
plum | #7a3d96 |
#9657b3 |
fill-chart-4 |
chart-5 |
sand | #a47e2a |
#b28b36 |
fill-chart-5 |
chart-6 |
burgundy | #8e3050 |
#ad4a69 |
fill-chart-6 |
chart-7 |
teal | #0090ab |
#219eb9 |
fill-chart-7 |
chart-8 |
indigo | #5650a8 |
#7069c4 |
fill-chart-8 |
- Assign slots in order and never cycle them; a ninth series folds into "Other". Scatter, bubble, map, and small-multiple forms carry at most three series (D-COL-19).
- Two or more series always have a legend, and four or fewer are also labeled on the chart. Values and labels use the text roles, never the series color. Status never uses a chart slot: it uses the status roles with an icon and a label (D-COL-19).
- Magnitude uses the sequential ramp
chart-seq-1(least) …chart-seq-5(most):#ffdbc8,#ffb68a,#f47920,#8f4200,#5c2a08in light, reversed in dark. For discrete ordered marks start at step 3; the light steps recede by design. - Diverging data uses roles:
secondaryandsecondary-containerfor the negative arm,surface-container-highestfor the midpoint,primary-containerandprimary-inkfor the positive arm. - Charts sit on
surface,surface-container-lowest, orcard-outlined-container, the grounds the build checks (every slot 3:1 or more; lowest 3.08:1,chart-1on the light page). Never put a chart in a filled or elevated card, a dialog, a popover, or a menu:chart-1is 2.91:1 onsurface-container-low, andchart-4andchart-6are 2.95:1 and 2.71:1 on the darksurface-raised(V-3). - shadcn's
--chart-1…--chart-5are the first five slots.
Tamakkan's HBDI result is a product data slot: quadrants A to D on chart-2, chart-3, chart-6, and chart-5, with pastel-lavender, pastel-mint, cat-burgundy-container, and pastel-sand as the quadrant fills, always lettered. The letters sit in the fill's on-color; the chart hues are only radar marks and card edges on the card surface, never marks on the fills (chart-3 is 2.88:1 on pastel-mint, chart-6 1.77:1 on the dark burgundy container) (canonical §15, V-3). See result card.
shadcn/ui bridge
A shadcn product (Global Jobs, and the AI tools that default to shadcn) loads the bridge after the system's Tailwind file, in this order, where <ds> is the path from the stylesheet to this package (Quick start) (D-COL-22, D-ARC-19):
@import "tailwindcss";
@import "<ds>/tokens/tailwind.css";
@import "<ds>/tokens/shadcn.css";| shadcn variable | System role | Note |
|---|---|---|
--background / --foreground |
surface / on-surface |
|
--card / --card-foreground |
card-outlined-container / on-surface |
Not surface-container-lowest, which is a well in dark (D-ARC-09) |
--popover / --popover-foreground |
surface-raised / on-surface |
|
--primary / --primary-foreground |
primary / on-primary |
The fill only |
--secondary / --secondary-foreground |
secondary-container / on-secondary-container |
The quiet lavender fill, not the blue |
--muted / --muted-foreground |
surface-container-low / on-surface-variant |
|
--accent / --accent-foreground |
surface-container-high / on-surface |
A neutral hover fill, not a brand accent |
--destructive / --destructive-foreground |
error / on-error |
|
--border |
outline-variant |
Hairlines |
--input |
outline |
Control edges |
--ring |
focus-ring |
|
--chart-1 … --chart-5 |
chart-1 … chart-5 |
|
--sidebar / --sidebar-foreground |
surface / on-surface |
|
--sidebar-primary / --sidebar-primary-foreground |
primary / on-primary |
|
--sidebar-accent / --sidebar-accent-foreground |
primary-container / on-primary-container |
The current and hovered item |
--sidebar-border / --sidebar-ring |
outline-variant / focus-ring |
- In a shadcn product
secondarymeans the quiet fill, in the utility and invar(--color-secondary)alike. Write the strong blue asinfo(text-info,bg-info). A lint rule outsidecomponents/ui/rejectssecondarymeaning blue (canonical §2.12). - Edit shadcn's Button
linkvariant totext-primary-ink(its defaulttext-primaryis 2.63:1). Dialog and Sheet sit onbg-surface-raised shadow-elevation-3; Skeleton uses the family sweep, notanimate-pulse(canonical §2.12, V-7). - Hover in shadcn class strings uses the color-mix recipe from State layers and disabled, never a hover hex (D-ARC-03).
- Never combine
shadcn.csswithdata-product. Under an accent, shadcn'sbg-primarykeeps the family orange (it reads--primary) while system utilities such astext-on-primarytake the accent: white on orange, 2.76:1.shadcn.csshas no accent; Tamakkan is not a shadcn product (V-5). - The shadcn radius scale is on the shape page; the full map with values is in the token reference.
Contrast contract
node tokens/build.mjs --check checks 57 rules (564 pairs) in light, dark, and the Tamakkan accent: text and icons 4.5:1 on every ground they may sit on, control edges and focus rings 3:1, chart marks 3:1. No known failure exists; a new pair that fails is fixed, not waived (D-COL-23, V-6). The contrast report lists every pair.
| Pair | Light | Dark | Tamakkan (light / dark) |
|---|---|---|---|
on-primary on primary |
6.19:1 | 6.19:1 | 5.70:1 / 5.70:1 |
primary (the fill) against the page; never text in either theme |
2.63:1 | 6.70:1 | n/a |
primary-ink, lowest on any surface, container, or pastel |
5.47:1 | 5.45:1 | 5.45:1 / 5.44:1 |
primary-ink on surface |
6.79:1 | 10.85:1 | 6.77:1 / 10.84:1 |
focus-ring, lowest on any ground |
5.47:1 | 5.45:1 | 5.45:1 / 5.44:1 |
on-surface, lowest |
13.14:1 | 7.19:1 | same |
on-surface-variant, lowest |
7.16:1 | 5.46:1 | same |
Status inks (error, warning, info, success), lowest |
4.97:1 | 5.45:1 | same |
| Role and status on-containers on their containers | 13.12:1 or more | 7.22:1 or more | the violet tint pair 9.41:1 / 8.32:1 |
Person-type chips (on-cat-*-container) |
11.53:1 or more | 7.36:1 or more | same |
outline, lowest on surfaces and primary-container |
3.47:1 | 3.71:1 | 3.87:1 / 4.62:1 on the violet tint |
inverse-on-surface / inverse-primary on inverse-surface |
11.63:1 / 7.74:1 | 13.83:1 / 9.21:1 | 7.73:1 / 9.19:1 (ink) |
on-card-art on -mid / -to stops, lowest |
5.85:1 / 3.23:1 | same | same |
| Chart slots on the chart grounds, lowest | 3.08:1 | 3.49:1 | same |
Measured beyond the build, because the format cannot declare composites:
- Under an 8% hover layer
primary-inkkeeps 4.53:1 or more on every surface, container, and pastel, the Tamakkan accent included. - Header glass over the inverse band keeps
on-surface-variantat 6.12:1; a selected row (bg-primary-container/30) keeps it at 8.64:1.
Accepted and undeclared: pressed composites (momentary; the lowest is 4.09:1, primary-ink in a pressed row over the dark pastel-sand); disabled content (exempt); the orange fill's edge against the page (the label identifies the button); outline-variant hairlines (decorative); the light sequential chart steps; micro text inside aria-hidden card art (canonical §2.13).
WCAG large text is 24px and up only (headline-sm and larger, hero, display, and numeral styles). title-md (18px, 700) still needs 4.5:1 (canonical §2.13).
How to pick a color
Work in this order: the ground first, then the text that may sit on it, then the accent, then the state.
| You are building | 1. Ground | 2. Text | 2. Secondary text | 3. Orange or accent | Control edges | Focus ring |
|---|---|---|---|---|---|---|
| The page, header, rail, sticky bars | bg-surface (bars: bg-surface/80 backdrop-blur-xl) |
text-on-surface |
text-on-surface-variant |
text-primary-ink (not as text on glass) |
border-outline |
default |
| A standalone card, a table region | bg-card-outlined-container border border-outline-variant |
text-on-surface |
text-on-surface-variant |
text-primary-ink |
border-outline |
default |
| The one focal card, a floating form card | bg-card-elevated-container border border-transparent shadow-elevation-1 |
text-on-surface |
text-on-surface-variant |
text-primary-ink |
border-outline |
default |
| A dialog, sheet, menu, popover, or listbox | bg-surface-raised border border-transparent shadow-elevation-3 |
text-on-surface |
text-on-surface-variant |
text-primary-ink |
border-outline |
default |
| A tonal panel, a filled card | bg-surface-container-low |
text-on-surface |
text-on-surface-variant |
text-primary-ink |
border-outline |
default |
| A field, select, or choice card | bg-surface-container-lowest |
text-on-surface |
text-on-surface-variant (placeholders too) |
accent-primary-ink (checks and radios) |
border-outline; focused border-primary-ink; invalid border-error |
default |
| A selected or current item, the one primary panel | bg-primary-container |
text-on-primary-container |
text-on-surface-variant |
text-primary-ink; a selected choice card's 2px edge border-primary-ink shadow-[inset_0_0_0_1px_var(--color-primary-ink)] |
border-outline |
default |
| A status notice or chip | bg-success-container, bg-warning-container, bg-error-container, bg-info-container, or bg-surface-container-high (neutral) |
the matching text-on-…-container |
the same on-color | links in the on-color, underlined | none: filled, tonal, or text controls only | default |
| A decorative tile, avatar, or category chip | bg-pastel-peach (cycle the four) |
text-on-pastel-peach or text-on-surface |
text-on-surface-variant |
text-primary-ink |
none | default |
| A dark band, snackbar, or plain tooltip | bg-inverse-surface |
text-inverse-on-surface |
text-inverse-on-surface-variant |
text-inverse-primary |
border-inverse-on-surface-variant |
[--color-focus-ring:var(--color-inverse-primary)] |
| An orange fill (the filled button, FAB, count badge, step disc) | bg-primary |
text-on-primary |
n/a | n/a | n/a | default for the control itself (its ring lies outside the fill); [--color-focus-ring:var(--color-on-primary)] on the fill only for a focusable element drawn inside it |
| Card and passport art | the 135° gradient | text-on-card-art (gold Jobs: text-on-passport-jobs) |
the same, large text only toward the light end | n/a | n/a | [--color-focus-ring:var(--color-on-card-art)] (gold Jobs: var(--color-on-passport-jobs)) |
| A chart's plot area | bg-surface, bg-surface-container-lowest, or bg-card-outlined-container |
values text-on-surface |
labels text-on-surface-variant |
series fill-chart-1 … in order |
n/a | default |
Then the state: hover and press layers, the selected fill with its cue, the disabled mixes, from State layers and disabled.
- If the text you need is not in the row of its ground, the pair is not checked: change the ground or the text, never the hex (D-COL-23).
- If an orange must be read, it is
primary-ink; if it is a large fill with a label on it, it isprimary; if it sits oninverse-surface, it isinverse-primary. - If a control's edge is its only identity, it is
outline; if a label, icon, or mark identifies it, the hairline may do (V-2).
Common mistakes found in the audit
The scans of the five live products found these, measured on the real pages. Each has one fix.
| Mistake | Where it was found | Measured | Fix | Items |
|---|---|---|---|---|
The lighter #b05717 ink on tints, and the [data-tint] swap that tries to rescue it |
oait.app home: "Ask about this" and "Explore app" on cards (27 text nodes a page); the Academy outlined button on hover. Global ID: the guest-verification notice link, 61 [data-tint] uses in 44 files |
4.48:1, 4.19:1 hovered, 3.86:1 on #dae2ff |
text-primary-ink everywhere; delete the swap. In the notice, the link takes the notice's on-color, underlined |
OA-1.02, ID-1.03, ID-2.02 (D-COL-03) |
| The orange fill used as text, a ring, or a thin line | oait.app contact form: the checked radio card's border and dot. Global ID: the Home apps-tile focus ring, three admin checkboxes, the progress fill, and the switch track. Global Jobs: the inverse band's eyebrow, link, and ring in #f47920 |
2.63:1 and 2.76:1 on light grounds, 2.13:1 on the track; 4.78:1 in the Jobs band, legible but the wrong role | primary-ink (accent-primary-ink, bg-primary-ink for fills); the global ring; inverse-primary in the band |
OA-1.03, ID-1.04, ID-1.05, ID-1.06, JB-1.04 (D-COL-02, D-COL-04, D-ARC-11) |
| Hover and press as darker hexes, filters, lifts, and whole-control opacity | Global Jobs #e86a10 / #dc6410 and opacity-50; oait.app hover:brightness-105, active:scale-[0.98], and opacity-70; Tamakkan's 85%-black mixes; Global Games' hover swaps and lifts, no pressed style, disabled at 0.5 to 0.7 |
Five products, five mechanisms; Jobs' pressed label falls to 4.79:1 | The state layer at 8% and 12%; disabled at 12% and 38% | JB-2.05, JB-2.07, OA-2.04, OA-2.05, TK-2.03, GG-2.18 (D-COL-05, D-ARC-03) |
| A second action color and dark green bands | Global Games home: forest #002117 CTAs, nav pill, selected role tab, and the manifesto and finale bands; four different primary-CTA treatments; the peach #f4dfd2 header band |
Focus ring 2.40:1 on the forest band | One filled primary button; the inverse band with inverse-* roles; the site header on surface |
GG-1.01, GG-1.02, GG-2.04 (D-COL-16, D-CSN-10) |
| A hairline as the only edge of a field | oait.app fields with outline-variant borders; Tamakkan's #e5e1ec field borders and segments |
1.62:1; 1.29:1; segments 1.12:1 | border-outline on fields; tabs for the segments |
OA-1.05, TK-1.10 (D-COL-11, V-2) |
| Faded secondary text | oait.app placeholders at 70% ("+961 …"); Tamakkan's landing placeholder; oait.app's inverse text at 80% and 75% | 3.96:1; 4.35:1 | Full-strength text-on-surface-variant; text-inverse-on-surface-variant in bands |
OA-1.04, TK-1.15 (D-COL-11, D-COL-12) |
| A focus ring nobody re-pointed | The Global Jobs toast (Sonner): a gray box-shadow ring | 1.61:1 | The family snackbar, ring re-pointed to inverse-primary |
JB-1.03 (D-COL-20, D-ARC-08) |
| Saturated data colors below 3:1 | Tamakkan's HBDI green and yellow | 2.28:1 and 1.53:1 on white | chart-3 and chart-5, always lettered |
TK-1.16 (D-COL-19) |
| Gradients on actions and page washes | Tamakkan's #7c3aed → #5b21b6 buttons and violet haze; the Global Jobs hero wash |
n/a | Flat primary; flat surface or surface-container-low |
TK-2.03 (D-COL-21) |
| Raw values, or the wrong role, where a role exists | oait.app's #b3261e error text and light-only #f9dedc alert; Global ID's #eae0da card borders, bg-black/32 scrim, and overlays on surface-container plus [data-tint]; the Jobs and Games off-by-one neutrals (#231a14, #52443b, #fcf1ea, #d8c2b5, #ffdbc9) |
n/a | error roles and the error banner; border-outline-variant; bg-scrim; bg-surface-raised; the family values |
OA-1.06, ID-2.04, ID-2.05, ID-2.06, JB-2.03, GG-2.03 (D-COL-10, D-COL-11, D-ARC-09) |
| A dark ink that fails on dark pastels | Tamakkan's app in dark: #a78bfa |
3.42:1 on dark pastels | primary-ink under the accent: #d2bbff |
TK-2.02 (D-COL-15) |
Languages and right to left
- Color never changes with the language. The
:lang(ar)block in the tokens changes type only (D-ARC-29). - Card gradients turn from 135° to 225° in right-to-left pages, so the dark end stays at the inline start (D-BCP-14, canonical §2.11).
- Status words are translated, never replaced by color: the status examples above come from Global ID and Global Jobs as they ship in Arabic and French, normalized to the glossary where they differ. "قريبًا" is the glossary spelling, with the tanween on the letter before the alif. Migration: Global ID's shipped "قريباً" moves to it (native review) (canonical §12.3, §12.6).
Related pages
- Brand: marks,
mark-inkandmark-accent, colors inside marks. - Elevation: the two shadows and depth by tone.
- Motion: state-layer timing.
- Accessibility: contrast, focus geometry, "not by color alone".
- Imagery: decoration shapes and the passport card.
- Token reference and contrast report.