@hegemonart/get-design-done 1.16.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.claude-plugin/marketplace.json +12 -4
  2. package/.claude-plugin/plugin.json +22 -4
  3. package/CHANGELOG.md +111 -0
  4. package/README.md +27 -2
  5. package/agents/design-auditor.md +65 -1
  6. package/agents/design-context-builder.md +6 -1
  7. package/agents/design-doc-writer.md +21 -0
  8. package/agents/design-executor.md +22 -4
  9. package/agents/design-pattern-mapper.md +62 -0
  10. package/agents/design-phase-researcher.md +1 -1
  11. package/agents/motion-mapper.md +74 -9
  12. package/agents/token-mapper.md +8 -0
  13. package/package.json +16 -2
  14. package/reference/components/README.md +27 -23
  15. package/reference/components/alert.md +198 -0
  16. package/reference/components/badge.md +202 -0
  17. package/reference/components/breadcrumbs.md +198 -0
  18. package/reference/components/chip.md +209 -0
  19. package/reference/components/command-palette.md +228 -0
  20. package/reference/components/date-picker.md +227 -0
  21. package/reference/components/file-upload.md +219 -0
  22. package/reference/components/list.md +217 -0
  23. package/reference/components/menu.md +212 -0
  24. package/reference/components/navbar.md +211 -0
  25. package/reference/components/pagination.md +205 -0
  26. package/reference/components/progress.md +210 -0
  27. package/reference/components/rich-text-editor.md +226 -0
  28. package/reference/components/sidebar.md +211 -0
  29. package/reference/components/skeleton.md +197 -0
  30. package/reference/components/slider.md +208 -0
  31. package/reference/components/stepper.md +220 -0
  32. package/reference/components/table.md +229 -0
  33. package/reference/components/toast.md +200 -0
  34. package/reference/components/tree.md +225 -0
  35. package/reference/css-grid-layout.md +835 -0
  36. package/reference/data-visualization.md +333 -0
  37. package/reference/external/NOTICE.hyperframes +28 -0
  38. package/reference/form-patterns.md +245 -0
  39. package/reference/image-optimization.md +582 -0
  40. package/reference/information-architecture.md +255 -0
  41. package/reference/motion-advanced.md +754 -0
  42. package/reference/motion-easings.md +381 -0
  43. package/reference/motion-interpolate.md +282 -0
  44. package/reference/motion-spring.md +234 -0
  45. package/reference/motion-transition-taxonomy.md +155 -0
  46. package/reference/motion.md +20 -0
  47. package/reference/onboarding-progressive-disclosure.md +250 -0
  48. package/reference/output-contracts/motion-map.schema.json +135 -0
  49. package/reference/platforms.md +346 -0
  50. package/reference/registry.json +445 -220
  51. package/reference/registry.schema.json +4 -0
  52. package/reference/rtl-cjk-cultural.md +353 -0
  53. package/reference/user-research.md +360 -0
  54. package/reference/variable-fonts-loading.md +532 -0
  55. package/scripts/lib/easings.cjs +280 -0
  56. package/scripts/lib/parse-contract.cjs +220 -0
  57. package/scripts/lib/spring.cjs +160 -0
  58. package/scripts/tests/test-motion-provenance.sh +64 -0
@@ -38,10 +38,14 @@
38
38
  "experience",
39
39
  "palette",
40
40
  "style-vocabulary",
41
+ "typography",
42
+ "layout",
43
+ "performance",
41
44
  "component-spec"
42
45
  ]
43
46
  },
44
47
  "tier": { "enum": ["L0", "L1", "L2"] },
48
+ "phase": { "type": "integer", "description": "Phase that introduced this entry" },
45
49
  "description": { "type": "string" },
46
50
  "registered_at": { "type": "string", "format": "date-time" }
47
51
  },
@@ -0,0 +1,353 @@
1
+ # RTL, CJK, and Cultural Localization — Reference Guide
2
+
3
+ Designing for a global audience is not a matter of translating strings and calling the work done. Layout direction, typographic rendering, number formatting, color semantics, and imagery all carry culturally specific expectations that, when violated, signal to users that the product was not made for them. This reference consolidates the key technical and cultural considerations that the get-design-done framework requires designers and engineers to understand before shipping to any non-English or non-Western market.
4
+
5
+ ---
6
+
7
+ ## 1. RTL Layout Mirroring
8
+
9
+ Right-to-left scripts — Arabic, Hebrew, Persian (Farsi), Urdu, and others — do not merely reverse the direction of text. They reverse the entire spatial logic of the interface. In an LTR layout, the reading eye enters from the left, proceeds to the right, and interprets "start" as left and "end" as right. In an RTL layout, "start" is right and "end" is left, and every directional affordance must be reconsidered accordingly.
10
+
11
+ ### Use CSS Logical Properties
12
+
13
+ The most consequential shift a codebase can make for RTL support is to replace physical CSS properties with logical ones. Physical properties (`margin-left`, `padding-right`, `border-left`, `left`, `right`) are hardcoded to absolute directions and do not respond to the document's writing direction. Logical properties (`margin-inline-start`, `padding-inline-end`, `inset-inline-start`, `inset-inline-end`) are resolved relative to the text flow and automatically mirror when `dir="rtl"` is set.
14
+
15
+ The replacement mapping is straightforward:
16
+
17
+ | Physical (avoid) | Logical (prefer) |
18
+ |------------------|-----------------|
19
+ | `margin-left` | `margin-inline-start` |
20
+ | `margin-right` | `margin-inline-end` |
21
+ | `padding-left` | `padding-inline-start` |
22
+ | `padding-right` | `padding-inline-end` |
23
+ | `border-left` | `border-inline-start` |
24
+ | `border-right` | `border-inline-end` |
25
+ | `left` (positioned) | `inset-inline-start` |
26
+ | `right` (positioned) | `inset-inline-end` |
27
+ | `text-align: left` | `text-align: start` |
28
+ | `text-align: right` | `text-align: end` |
29
+
30
+ Browser support for CSS logical properties is excellent across all modern browsers. There is no legitimate reason to use physical properties in new code targeting a product that will ever need RTL support.
31
+
32
+ ### Set `dir="rtl"` at the Document Root
33
+
34
+ The `dir` attribute on `<html>` propagates directionality through the entire DOM. When a user's locale is an RTL language, set `<html dir="rtl" lang="ar">` (or the appropriate lang code). Never apply `dir="rtl"` on a per-element basis to work around missing logical properties — this creates brittle, partially mirrored layouts that fail in unpredictable ways as components are reused. The single root-level `dir` attribute, combined with logical CSS properties throughout, produces a fully mirrored layout with zero per-element overrides.
35
+
36
+ If a product serves both LTR and RTL users from the same codebase, control the direction via a class or data attribute on `<html>` that is set at runtime based on the user's locale: `<html class="rtl">` with a CSS rule `html.rtl { direction: rtl; }`.
37
+
38
+ ### What to Mirror
39
+
40
+ The following elements must mirror their visual position and directional meaning in RTL layouts:
41
+
42
+ - **Navigation arrows and chevrons** — a "next" chevron that points right in LTR must point left in RTL, because the reading direction of "forward" is reversed. A back-navigation arrow that points left in LTR must point right in RTL.
43
+ - **Layout flow** — the primary content column in LTR occupies the left portion of a sidebar layout; in RTL it occupies the right. Sidebars swap sides.
44
+ - **Text alignment** — body copy, labels, and headings should be `text-align: start`, not hardcoded left.
45
+ - **Form label position** — labels that appear to the left of form inputs in LTR should appear to the right in RTL.
46
+ - **Breadcrumbs** — the separating chevrons between breadcrumb items point in the direction of reading progression. In LTR this is rightward; in RTL it is leftward.
47
+ - **Progress bars** — the fill of a progress bar represents progression from start to finish. In LTR the fill grows from left to right; in RTL it grows from right to left. Use `direction: rtl` or `transform: scaleX(-1)` on the fill container, not hardcoded positional values.
48
+ - **Sliders and range inputs** — same rationale as progress bars.
49
+ - **Ordered lists** — numbering should still render left-to-right within the numeral, but the list item content begins from the right margin.
50
+
51
+ ### What NOT to Mirror
52
+
53
+ Not everything in an RTL layout should be physically reversed. The following elements retain their LTR or universal orientation regardless of document direction:
54
+
55
+ - **Numerals** — digits (0–9) are universally rendered left-to-right, even within Arabic text. A price of ١٢٣٤ is rendered with the most-significant digit on the left. Never reverse digit order.
56
+ - **Media player controls** — play, pause, rewind, and fast-forward icons on a video player represent time-based operations on a fixed universal timeline, not reading direction. A play button always points right; a rewind button always points left. These are not mirrored.
57
+ - **Phone numbers** — telephone numbers are always rendered in their conventional digit sequence, which is LTR. Wrapping a phone number in `<bdi>` ensures it is never accidentally reversed by the Unicode bidirectional algorithm.
58
+ - **Prices and currency** — numeric amounts are LTR. Currency symbol position relative to the number is locale-determined (see Section 6), but the number itself reads left-to-right.
59
+ - **Logos and wordmarks** — brand assets are not mirrored.
60
+ - **Non-directional icons** — a star, a heart, a close (×) icon, a settings gear, or a user avatar carries no inherent directional meaning and must never be flipped.
61
+ - **Maps and geographic imagery** — compass orientation is universal.
62
+ - **Mathematical and scientific notation** — equations, formulas, and scientific symbols always render LTR.
63
+
64
+ ### Mirroring Icons with CSS
65
+
66
+ For genuinely directional icons (chevrons, arrows, back/forward buttons, send/receive icons that imply a direction of flow), the correct implementation uses `transform: scaleX(-1)` applied via a CSS utility class rather than maintaining separate RTL icon assets:
67
+
68
+ ```css
69
+ [dir="rtl"] .icon-directional {
70
+ transform: scaleX(-1);
71
+ }
72
+ ```
73
+
74
+ This approach means a single SVG asset handles both directions. The `scaleX(-1)` flip is visually identical to a horizontally mirrored SVG at no additional asset cost. However, this transform must only be applied to icons that genuinely change meaning with direction. Applying it to non-directional icons (close, star, settings) produces incorrect results and signals a misunderstanding of the mirroring model.
75
+
76
+ ### `writing-mode` for Vertical Text
77
+
78
+ CSS `writing-mode: vertical-rl` or `writing-mode: vertical-lr` enables vertical text layout, which is a feature of CJK typographic tradition — Chinese, Japanese, and Korean texts are often composed in vertical columns reading top-to-bottom, right-to-left. This property must never be applied to Arabic, Hebrew, or other RTL scripts. RTL scripts run horizontally; vertical RTL text is not a standard typographic form and will produce illegible results.
79
+
80
+ ---
81
+
82
+ ## 2. CJK Typography
83
+
84
+ Chinese, Japanese, and Korean scripts have typographic properties that differ substantially from Western Latin. Each glyph occupies a full square em, strokes are complex and numerous, and word boundaries do not exist in the same way as in Latin. These properties require deliberate configuration to render correctly and readably.
85
+
86
+ ### Line Height
87
+
88
+ CJK body text requires a line height of 1.5–1.8 times the font size. This range is tighter than the commonly cited 1.4–1.6 recommendation for Western Latin text, but the reason is different: CJK glyphs occupy a larger proportion of the em square, and their visual density is higher. Without adequate line height, the visual "color" of a CJK text block becomes oppressively dark and the vertical rhythm collapses.
89
+
90
+ The practical implication is that a product which sets `line-height: 1.4` globally — a common default for English body copy — will produce overly tight CJK text that readers find fatiguing. Set the line height per locale or per language in the CSS, either using lang-based selectors or by applying a CSS class that is added to `<html>` alongside the lang attribute:
91
+
92
+ ```css
93
+ :lang(zh), :lang(ja), :lang(ko) {
94
+ line-height: 1.65;
95
+ }
96
+ ```
97
+
98
+ ### Text Justification
99
+
100
+ Never apply `text-align: justify` to CJK text without a CJK-aware justification engine. Standard CSS justification distributes whitespace between words. In Latin text, this adds space at word boundaries. In CJK text, there are no word boundaries in the typographic sense — each character is individually spaced — so browsers that lack CJK justification awareness either do nothing (most browsers) or distribute space in ways that create rivers of whitespace and uneven optical density. The correct CJK text alignment is `text-align: start` (which resolves to right-aligned in RTL contexts) or explicit `text-align: left` for horizontally presented CJK.
101
+
102
+ CSS Text Level 4 introduces `text-justify: inter-character`, which does handle CJK justification correctly, but browser support is still partial. Until it is universally available, avoid justified CJK text entirely.
103
+
104
+ ### Font Fallback Stacks
105
+
106
+ System fonts for CJK scripts differ by platform and by script variant. A well-constructed font stack lists preferred fonts in priority order, falling back through platform-native options to a generic family. The stacks below cover the major platforms (macOS/iOS, Windows, and Android):
107
+
108
+ **Simplified Chinese (Mainland China, Singapore):**
109
+ ```css
110
+ font-family: "PingFang SC", "Microsoft YaHei", "STHeiti", "WenQuanYi Micro Hei", sans-serif;
111
+ ```
112
+
113
+ **Traditional Chinese (Taiwan, Hong Kong, Macau):**
114
+ ```css
115
+ font-family: "PingFang TC", "Microsoft JhengHei", "STFangsong", "Apple LiGothic Medium", sans-serif;
116
+ ```
117
+
118
+ **Japanese:**
119
+ ```css
120
+ font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
121
+ ```
122
+
123
+ **Korean:**
124
+ ```css
125
+ font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
126
+ ```
127
+
128
+ PingFang (SC and TC variants) ships on macOS and iOS. Microsoft YaHei and JhengHei ship on Windows. Noto Sans variants (JP, KR, SC, TC) are the reliable cross-platform fallback for Android and Linux. Including Noto Sans variants provides coverage on platforms where system CJK fonts may not be present.
129
+
130
+ ### Font Size Floor
131
+
132
+ Never render CJK body text below 14px. CJK glyphs have a high stroke complexity — a single character may contain dozens of strokes at different angles. At sizes below 14px, strokes begin to merge or disappear on non-retina displays, turning legible characters into ambiguous blobs. This is a more severe legibility failure than occurs with Latin text at small sizes, because a misread Latin letter rarely causes complete meaning loss; a misread CJK character can change the meaning of an entire sentence.
133
+
134
+ The minimum of 14px applies specifically to body text. Labels, captions, and supplementary text in dense interfaces may go as low as 12px only on retina displays where sub-pixel rendering provides adequate stroke clarity. Never go below 12px regardless of display density.
135
+
136
+ ### Word Breaking
137
+
138
+ Use `word-break: break-all` for CJK text. Because CJK scripts have no inter-word spaces, the browser has no natural break opportunities within a continuous run of characters. Without `word-break: break-all`, a long CJK string will overflow its container rather than wrapping. The `overflow-wrap: break-word` property alone is insufficient — it only breaks at word boundaries, which do not exist in CJK.
139
+
140
+ ```css
141
+ :lang(zh), :lang(ja), :lang(ko) {
142
+ word-break: break-all;
143
+ }
144
+ ```
145
+
146
+ This setting does not harm Latin text embedded within CJK paragraphs because the browser still prefers natural Latin word boundaries when they exist; `break-all` only takes effect when no other break opportunity is available.
147
+
148
+ ---
149
+
150
+ ## 3. Arabic and Hebrew Typography
151
+
152
+ Arabic and Hebrew are both right-to-left scripts, but they have different typographic properties that require different handling.
153
+
154
+ ### Arabic
155
+
156
+ Arabic is a connected script — letters in a word join to their neighbors, changing form based on their position (initial, medial, final, isolated). This means that inserting visual space between letters by manipulating `letter-spacing` does not merely change the tracking; it breaks the word by separating letterforms that are designed to connect. Never apply positive `letter-spacing` to Arabic text. The visual result is not "spaced Arabic" — it is unreadable fragments.
157
+
158
+ Within an RTL context established by `dir="rtl"`, Arabic text should be aligned with `text-align: right` (or the logical equivalent `text-align: start`). Arabic text never uses `text-align: justify` for the same reasons as CJK, with the additional complication that letter connection makes justification even less reliable.
159
+
160
+ Font selection for Arabic requires fonts that include the full range of Arabic letter forms, contextual alternates, and diacritical marks (harakat). System fonts (SF Arabic on Apple platforms, Segoe UI on Windows) handle this correctly. When using web fonts for Arabic, verify that the font includes all required Unicode blocks (U+0600–U+06FF for basic Arabic, U+FB50–U+FDFF for Arabic Presentation Forms-A).
161
+
162
+ ### Hebrew
163
+
164
+ Hebrew is a right-to-left script with standalone glyphs — letters do not connect to their neighbors. This means `letter-spacing` is safe to use for Hebrew text and can be used for aesthetic and readability purposes in the same way as Latin. This is a meaningful practical difference from Arabic, where the same property causes rendering failures.
165
+
166
+ Hebrew text uses `text-align: right` (or `text-align: start`) within RTL context. Nikud (vowel diacritic marks) are used in some Hebrew contexts (children's books, prayer texts, poetry) but are absent in most digital UI text. Font stacks for Hebrew should include "David", "Arial Hebrew", or "Noto Sans Hebrew" as fallbacks.
167
+
168
+ ### Bidirectional Text
169
+
170
+ Mixed RTL and LTR content — common when Arabic or Hebrew text includes embedded product names, URLs, user-entered numbers, or quoted Latin strings — is handled by the Unicode Bidirectional Algorithm (UBA). The UBA resolves most cases correctly, but several scenarios require explicit markup:
171
+
172
+ **Use `<bdi>` for user-generated text** embedded within a known-direction sentence. If an Arabic interface displays a username that may be Latin, Hebrew, or Arabic, wrapping the username in `<bdi>` (bidirectional isolation) tells the browser to determine the username's direction independently rather than inheriting the surrounding RTL context. Without `<bdi>`, a Latin username in the middle of an Arabic sentence can cause the surrounding text to reflow incorrectly.
173
+
174
+ ```html
175
+ <!-- Arabic sentence with isolated user-generated name -->
176
+ <p dir="rtl">مرحباً <bdi>John_123</bdi>، كيف حالك؟</p>
177
+ ```
178
+
179
+ **Use Unicode control characters as a last resort** — the LRE (U+202A), RLE (U+202B), LRO (U+202D), RLO (U+202E), and PDF (U+202C) marks can be embedded in plain-text strings where HTML markup is unavailable. However, these invisible characters can cause accessibility issues (screen readers may announce them) and complicate string manipulation. Prefer `<bdi>` and CSS `unicode-bidi` where markup is possible.
180
+
181
+ ### Quotation Marks
182
+
183
+ Quotation conventions differ between Arabic and Hebrew:
184
+
185
+ - **Arabic:** Uses guillemets `«»` (French-style double angle brackets) or decorative quotation marks `❝❞`. The simple `""` ASCII quotation marks are understood but considered informal.
186
+ - **Hebrew:** Uses low-high marks `„"` — the opening mark is low (double low-9 quotation mark, U+201E) and the closing mark is high (right double quotation mark, U+201C). This convention mirrors German usage.
187
+
188
+ These distinctions matter for interfaces that generate quoted content programmatically, such as pull-quote components, testimonial blocks, or inline citation formatting.
189
+
190
+ ---
191
+
192
+ ## 4. Devanagari, Tamil, and Thai
193
+
194
+ Several non-CJK, non-RTL scripts present typographic challenges that are easily overlooked by teams whose design systems were built for Latin text. The common thread is that these scripts use stacked diacritical marks that extend above and below the baseline, requiring more vertical space than Latin letters of the same nominal font size.
195
+
196
+ ### Devanagari (Hindi, Marathi, Sanskrit)
197
+
198
+ Devanagari glyphs are connected at the top by a horizontal head-stroke called the mātrā (शिरोरेखा). Vowel matras and consonant clusters create compound characters that extend both above and below the main body of the text. Line height must be at least 1.6 to prevent these extensions from overlapping with adjacent lines. More critically, never apply `overflow: hidden` to a container holding Devanagari text without verifying that the line height provides adequate clearance for ascending matras. A container that clips its contents will visually cut off the tops of many Devanagari characters, producing illegible fragments.
199
+
200
+ Font recommendations for Devanagari include "Noto Sans Devanagari", "Mangal" (Windows), and "Kohinoor Devanagari" (Apple platforms). When Devanagari text renders poorly, the first diagnostic step is to check whether the active font includes the Devanagari Unicode block (U+0900–U+097F).
201
+
202
+ ### Tamil
203
+
204
+ Tamil is an abugida with complex conjunct characters and independent vowel signs. Compound characters can extend significantly above and below the typographic baseline, much like Devanagari. The same line-height minimum of 1.6 applies, and the same `overflow: hidden` caution holds. Tamil is used primarily in Tamil Nadu (India) and Sri Lanka, and its script is distinct from Hindi/Devanagari — they are not related visually or phonologically. Font support for Tamil requires fonts including the Tamil Unicode block (U+0B80–U+0BFF), such as "Noto Sans Tamil" or the system font "Tamil Sangam MN" on Apple platforms.
205
+
206
+ ### Thai
207
+
208
+ Thai uses a complex system of tonal marks and vowel signs that stack both above and below consonants. A single syllable may be represented by a consonant with a vowel above it and a tonal mark above that — a three-layer vertical stack. This requires a minimum line height of 1.7 for Thai body text. Tighter line heights cause tonal marks from one line to overlap with the top of descenders from the line above, making the text visually inseparable.
209
+
210
+ Thai text must never be converted to uppercase. While the CSS property `text-transform: uppercase` is sometimes applied globally (for example, to all navigation labels or button labels), Thai has no uppercase/lowercase distinction. Applying `text-transform: uppercase` to Thai text has no visible effect in some browsers and produces garbled output in others. If uppercase is applied globally, suppress it for Thai with a lang selector:
211
+
212
+ ```css
213
+ :lang(th) {
214
+ text-transform: none;
215
+ }
216
+ ```
217
+
218
+ Font recommendations for Thai include "Thonburi" (Apple platforms), "Tahoma" and "Leelawadee UI" (Windows), and "Noto Sans Thai" as a universal fallback.
219
+
220
+ ---
221
+
222
+ ## 5. Cultural Color Meanings
223
+
224
+ Color carries cultural meaning that varies substantially across regions and traditions. A color that signals celebration and good fortune in one culture may signal mourning or danger in another. Design decisions that use color to communicate meaning — success, warning, premium status, pricing — must account for these associations, particularly in contexts where the product is being localized rather than merely translated.
225
+
226
+ The table below documents the primary cultural associations for six key colors across major global markets. These are dominant conventional associations, not universal truths; individual variation always exists within any culture.
227
+
228
+ | Color | US / Western Europe | China / East Asia | Japan | Islamic World | India | Brazil |
229
+ |-------|--------------------|--------------------|-------|---------------|-------|--------|
230
+ | **Red** | Danger, stop, error; also passion and urgency | Luck, prosperity, celebration, festivity; red envelopes (hóngbāo) symbolize gift-giving and fortune | Danger, warning; also energy and passion; in traditional contexts, sacred | Danger, caution; not strongly positive or negative; some associations with sacrifice | Purity in some traditions; danger and warning in modern UI contexts | Passion, energy, also associated with Carnival; not primarily danger |
231
+ | **White** | Purity, cleanliness, minimalism, wedding color | Mourning, death, funerals; white flowers are funeral flowers; use caution in celebratory contexts | Death, mourning; white is the traditional funeral color in Japan | Purity, peace, cleanliness; positive associations; used in religious contexts | Mourning (widowhood) in traditional Hindu contexts; purity in some contexts | Peace, purity; wedding color; largely positive |
232
+ | **Green** | Positive, go, success, environmental; money (US) | Growth, health, environmental awareness; increasingly positive; no strong negative connotations | Nature, youth, freshness; positive | The color of Islam; sacred, paradisiacal; strongly positive across Islamic cultures | Auspicious, prosperity, new beginnings; associated with fertility and harvest | Nature, rainforest, ecology; strongly positive; national color association |
233
+ | **Blue** | Trust, security, technology, calm; dominant corporate color | Immortality, healing; less dominant than red or gold; associated with cold and sadness in some regional contexts | Calm, cleanliness, coolness; positive in modern contexts | Safety, heaven, protection; positive across many Islamic traditions; widely used in architecture | Trust, wisdom, divine (Krishna is depicted in blue); largely positive | Trust, loyalty, sadness; also associated with Iemanjá (water deity) in Afro-Brazilian traditions |
234
+ | **Yellow** | Caution (when paired with black), happiness, sunshine; gold = wealth | Imperial color historically; gold = wealth and good fortune; yellow is very positive | Joy, optimism, sunshine; associated with courage in traditional contexts | Joy, happiness; gold is a positive color associated with wealth and paradise | Auspicious (associated with turmeric and festivals like Basant Panchami); highly positive | Joy, optimism, sunshine; also associated with caution (traffic context) |
235
+ | **Black** | Sophistication, luxury, formality, death/mourning | Bad luck, evil, irregularity; less used in celebratory contexts; increasingly neutral in urban/modern contexts | Formality, sophistication, evil in some traditional narratives; increasingly neutral and elegant in design | Death, mourning; but also strength and authority; widely used in calligraphy and art | Evil, darkness, inauspicious; typically avoided in celebratory contexts | Mourning, death; also sophistication and elegance in urban fashion contexts |
236
+
237
+ ### Practical Application
238
+
239
+ These associations have direct implications for product design decisions. A "success" state that uses green with white text works well in Western European markets but is potentially jarring in contexts where white signals mourning. A premium tier that uses gold/yellow resonates strongly in Chinese, Indian, and Islamic contexts. Red as a primary brand color is highly positive in China but primarily reads as warning or danger in Western UI conventions.
240
+
241
+ When localizing a design system, audit the semantic color tokens (success, warning, error, premium, notification) and verify that the chosen colors do not carry strongly negative associations in the target market. This does not always require changing the color — it may require pairing the color with additional typographic or iconographic signals that reinforce the intended meaning independently of the color.
242
+
243
+ ---
244
+
245
+ ## 6. Number, Date, and Currency Formatting
246
+
247
+ Number and date formatting is one of the most frequently implemented incorrectly. The temptation to format numbers manually — a `.toFixed(2)` here, a `.replace('.', ',')` there — produces fragile code that breaks for edge cases (negative numbers, very large numbers, non-standard locales) and requires constant maintenance as markets are added. The correct approach uses the browser's `Intl` API universally and unconditionally.
248
+
249
+ ### Number Formatting with `Intl.NumberFormat`
250
+
251
+ The `Intl.NumberFormat` constructor accepts a locale string and an options object and handles all locale-specific separators, decimal marks, and digit systems:
252
+
253
+ ```js
254
+ // US: "1,234,567.89"
255
+ new Intl.NumberFormat('en-US').format(1234567.89);
256
+
257
+ // Germany: "1.234.567,89"
258
+ new Intl.NumberFormat('de-DE').format(1234567.89);
259
+
260
+ // France: "1 234 567,89" (narrow non-breaking space)
261
+ new Intl.NumberFormat('fr-FR').format(1234567.89);
262
+
263
+ // Arabic (Eastern Arabic numerals): "١٢٣٤٥٦٧٫٨٩"
264
+ new Intl.NumberFormat('ar-EG').format(1234567.89);
265
+ ```
266
+
267
+ Thousand separator conventions differ significantly across markets:
268
+
269
+ | Market | Thousand separator | Decimal separator |
270
+ |--------|--------------------|------------------|
271
+ | United States, United Kingdom | `,` (comma) | `.` (period) |
272
+ | Germany, Brazil, most of continental Europe | `.` (period) | `,` (comma) |
273
+ | France, Switzerland (French) | `\u202f` (narrow no-break space) | `,` (comma) |
274
+ | India | `,` but with South Asian grouping (2-2-3) | `.` (period) |
275
+ | Arabic locales | `٬` or `,` depending on region | `٫` or `.` |
276
+
277
+ Never manually implement these with string replacement. The combinations are too numerous and too locale-specific to maintain reliably by hand.
278
+
279
+ ### Date Formatting with `Intl.DateTimeFormat`
280
+
281
+ Date format conventions vary not only in separator character and component order but also in calendar system. The Gregorian calendar is dominant in most markets, but the Islamic (Hijri) calendar is used in many Arabic-speaking countries, the Hebrew calendar is used in Israel, and the Japanese imperial calendar (gengō) is used in some Japanese government and business contexts.
282
+
283
+ ```js
284
+ // US: "4/24/2026"
285
+ new Intl.DateTimeFormat('en-US').format(new Date('2026-04-24'));
286
+
287
+ // Germany: "24.4.2026"
288
+ new Intl.DateTimeFormat('de-DE').format(new Date('2026-04-24'));
289
+
290
+ // Japan (Gregorian): "2026/4/24"
291
+ new Intl.DateTimeFormat('ja-JP').format(new Date('2026-04-24'));
292
+
293
+ // Saudi Arabia (Islamic calendar): displays in Hijri
294
+ new Intl.DateTimeFormat('ar-SA', { calendar: 'islamic' }).format(new Date('2026-04-24'));
295
+ ```
296
+
297
+ Never hardcode date strings in any format. A hardcoded string like "April 24, 2026" is not automatically localized, fails for screen readers in non-English locales, and requires code changes when date display requirements change.
298
+
299
+ ### RTL Currency Formatting
300
+
301
+ In Arabic-locale contexts, the amount appears to the left of the currency symbol: `1,234 ﷼` rather than `﷼1,234`. This is the typographically correct convention for right-to-left currency display and is handled automatically by `Intl.NumberFormat` when the correct locale is used:
302
+
303
+ ```js
304
+ // Produces the correct Arabic currency format automatically
305
+ new Intl.NumberFormat('ar-SA', {
306
+ style: 'currency',
307
+ currency: 'SAR'
308
+ }).format(1234.56);
309
+ ```
310
+
311
+ Do not attempt to replicate this logic manually. The `Intl` API encodes the correct CLDR (Common Locale Data Repository) behavior for each locale, including symbol position, spacing, and digit system.
312
+
313
+ ---
314
+
315
+ ## 7. Inclusive Imagery
316
+
317
+ Visual imagery in products communicates assumptions about who the product is for. When all human figures in a product's illustration system share the same skin tone, body type, and cultural presentation, the implicit message is that other users are outside the intended audience. Inclusive imagery is not a cosmetic concern — it is a fundamental signal about who the product treats as a default person.
318
+
319
+ ### Skin Tone Representation
320
+
321
+ The Fitzpatrick scale provides five skin tone modifiers (Types I–V, plus the neutral/default) that are universally implemented in Unicode emoji. When selecting or commissioning illustrations for product use, apply the same principle: deliberately distribute skin tones across the Fitzpatrick range rather than defaulting to a single tone.
322
+
323
+ In illustration systems where human characters appear consistently, define a set of three to five distinct skin tone values in the design system's color tokens (analogous to `--skin-tone-1` through `--skin-tone-5`) and apply them across the illustration library. This approach ensures that different use cases (success states, onboarding illustrations, error pages, empty states) collectively represent a range of human appearances rather than defaulting to a single idealized user.
324
+
325
+ When skin tone is rendered via SVG fills, the tokens can be overridden per use case or per user preference, allowing a product to display a skin tone that matches the logged-in user's explicit selection.
326
+
327
+ ### Gender Representation
328
+
329
+ Avoid gendered role assignments in professional or technical imagery. Illustrations that consistently depict doctors as male and nurses as female, or that associate technical roles with men and care roles with women, reinforce stereotypes that make some users feel excluded from the product's imagined community.
330
+
331
+ The practical default for professional and technical illustrations is gender-neutral presentation: clothing, hairstyles, and body proportions that do not resolve definitively to a single gender presentation. Where specific gender presentation is relevant (for example, a product feature specifically for a particular community), use accurate and affirming representation. Where it is not relevant, default to ambiguity.
332
+
333
+ Avoid the common workaround of representing gender neutrality solely through an abstract avatar (silhouette, geometric shape, or headless torso). These representations avoid the problem rather than solving it. Users do not recognize themselves in abstractions; they recognize themselves in characters that are drawn with care and detail.
334
+
335
+ ### Ability and Assistive Technology
336
+
337
+ People who use wheelchairs, prosthetic limbs, hearing aids, white canes, and other assistive devices are users, not exceptions. An illustration system that never depicts assistive technology is implicitly representing a world in which all users are non-disabled — an inaccurate and exclusionary representation.
338
+
339
+ Include assistive devices in diverse illustration sets at a proportion that reflects their real-world prevalence. This means that not every illustration must include a wheelchair user, but across the full illustration library, multiple instances should naturally appear. The presence of assistive technology in product imagery sends a clear signal to disabled users that the product has considered their existence. The absence sends the opposite signal.
340
+
341
+ When depicting wheelchair users, hearing aid users, or prosthetic users, represent them as doing the same things as other users in the illustration — completing tasks, experiencing success states, using the product in its intended context. Avoid representations that isolate disability as a subject of the illustration rather than incidental to the depicted activity.
342
+
343
+ ### Cultural Dress and Representation
344
+
345
+ Technical and professional product imagery should default to contemporary clothing that reflects the actual dress of people who work in modern professional contexts, which is globally diverse. Reducing cultural representation to traditional or ceremonial dress — the turban as a shorthand for South Asian identity, the kimono as a shorthand for Japanese identity — reduces rich cultural identities to costume.
346
+
347
+ When contemporary clothing is depicted, it should reflect the actual diversity of how people dress globally: headscarves and hijabs worn by Muslim women are contemporary professional dress, not traditional costume. Saris worn in professional contexts are contemporary professional dress. The standard should be that each depicted person is dressed in a way that is accurate to how a person from their apparent background might actually dress in the context being depicted, not in a way that telegraphs their cultural identity as a distinguishing marker.
348
+
349
+ Skin tone, body size, age, and hair type should all be varied across the illustration library. An illustration system that depicts only young, thin, able-bodied people with a narrow range of hair types is making assumptions about who uses the product. Challenge each of these defaults when commissioning or curating illustration assets.
350
+
351
+ ---
352
+
353
+ *This reference governs international layout, typography, formatting, and imagery decisions within the get-design-done framework. Deviations require explicit justification in `.design/DESIGN-CONTEXT.md` as a C-XX constraint.*