mobileui-os 1.0.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 (123) hide show
  1. package/AGENTS.md +47 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +78 -0
  4. package/bin/cli.mjs +375 -0
  5. package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
  6. package/knowledge/android/accessibility.md +333 -0
  7. package/knowledge/android/components-controls.md +270 -0
  8. package/knowledge/android/material-design-3.md +174 -0
  9. package/knowledge/android/navigation-patterns.md +212 -0
  10. package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
  11. package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
  12. package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
  13. package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
  14. package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
  15. package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
  16. package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
  17. package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
  18. package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
  19. package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
  20. package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
  21. package/knowledge/apple/Interaction-behaviour.md +1378 -0
  22. package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
  23. package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
  24. package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
  25. package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
  26. package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
  27. package/knowledge/apple/Patterns-templates-composition.md +647 -0
  28. package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
  29. package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
  30. package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
  31. package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
  32. package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
  33. package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
  34. package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
  35. package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
  36. package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
  37. package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
  38. package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
  39. package/knowledge/apple/accessibility.md +2162 -0
  40. package/knowledge/apple/color.md +1933 -0
  41. package/knowledge/apple/component-architecture.md +2208 -0
  42. package/knowledge/apple/components.md +2172 -0
  43. package/knowledge/apple/design-decision-framework.md +1883 -0
  44. package/knowledge/apple/design-review-engine.md +2108 -0
  45. package/knowledge/apple/design-tokens.md +1943 -0
  46. package/knowledge/apple/designing-for-ios.md +1680 -0
  47. package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
  48. package/knowledge/apple/hig-foundation.md +1806 -0
  49. package/knowledge/apple/iconography.md +1903 -0
  50. package/knowledge/apple/interaction-patterns.md +2513 -0
  51. package/knowledge/apple/interaction.md +2141 -0
  52. package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
  53. package/knowledge/apple/ios-components-and-controls.md +1634 -0
  54. package/knowledge/apple/ios-components-patterns.md +1343 -0
  55. package/knowledge/apple/ios-design-system-architecture.md +1520 -0
  56. package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
  57. package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
  58. package/knowledge/apple/ios-forms-and-input.md +1458 -0
  59. package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
  60. package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
  61. package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
  62. package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
  63. package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
  64. package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
  65. package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
  66. package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
  67. package/knowledge/apple/ios-search-and-discovery.md +1456 -0
  68. package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
  69. package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
  70. package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
  71. package/knowledge/apple/layout.md +2331 -0
  72. package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
  73. package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
  74. package/knowledge/apple/motion-and-animation.md +1698 -0
  75. package/knowledge/apple/motion.md +2087 -0
  76. package/knowledge/apple/navigation.md +2281 -0
  77. package/knowledge/apple/responsive-adaptive.md +2159 -0
  78. package/knowledge/apple/screen-architecture.md +2067 -0
  79. package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
  80. package/knowledge/apple/typography.md +1802 -0
  81. package/knowledge/apple/ui-ux inteligence audit.md +106 -0
  82. package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
  83. package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
  84. package/knowledge/apple/visual-materials.md +2189 -0
  85. package/package.json +53 -0
  86. package/principles/design-principles.md +37 -0
  87. package/principles/platform-principles.md +25 -0
  88. package/principles/ux-principles.md +16 -0
  89. package/references/official-links.md +11 -0
  90. package/skills/accessibility-engineer/SKILL.md +125 -0
  91. package/skills/analytics-engineer/SKILL.md +283 -0
  92. package/skills/animation-engineer/SKILL.md +316 -0
  93. package/skills/component-designer/SKILL.md +75 -0
  94. package/skills/component-library-engineer/SKILL.md +140 -0
  95. package/skills/component-library-ops/SKILL.md +155 -0
  96. package/skills/design-system/SKILL.md +77 -0
  97. package/skills/design-token-engineer/SKILL.md +203 -0
  98. package/skills/design-token-pipeline/SKILL.md +277 -0
  99. package/skills/device-lab-engineer/SKILL.md +387 -0
  100. package/skills/forms-engineer/SKILL.md +79 -0
  101. package/skills/internationalization-engineer/SKILL.md +256 -0
  102. package/skills/motion-designer/SKILL.md +77 -0
  103. package/skills/native-data-fetching/SKILL.md +50 -0
  104. package/skills/navigation-architect/SKILL.md +65 -0
  105. package/skills/performance-engineer/SKILL.md +250 -0
  106. package/skills/platform-specialist/SKILL.md +95 -0
  107. package/skills/pre-release-gate/SKILL.md +75 -0
  108. package/skills/screen-designer/SKILL.md +117 -0
  109. package/skills/security-engineer/SKILL.md +375 -0
  110. package/skills/skills.json +134 -0
  111. package/skills/testing-auditor/SKILL.md +62 -0
  112. package/skills/ui-architect/SKILL.md +86 -0
  113. package/skills/ui-implementer/SKILL.md +188 -0
  114. package/skills/ux-architect/SKILL.md +49 -0
  115. package/skills/ux-auditor/SKILL.md +52 -0
  116. package/skills/visual-auditor/SKILL.md +71 -0
  117. package/templates/audit-report.md +29 -0
  118. package/templates/design-tokens.ts +33 -0
  119. package/templates/screen-spec.md +61 -0
  120. package/workflows/new-screen.md +17 -0
  121. package/workflows/pre-release.md +21 -0
  122. package/workflows/redesign.md +14 -0
  123. package/workflows/ui-audit.md +22 -0
@@ -0,0 +1,1933 @@
1
+
2
+
3
+ ````md
4
+ # Apple Color Intelligence
5
+
6
+ > Agent knowledge module for semantic color systems, dynamic color,
7
+ > light/dark appearance, contrast, tint, accents, states, gradients,
8
+ > artwork-derived palettes, and color accessibility for iOS/iPadOS-inspired UI.
9
+
10
+ Version: 1.0
11
+ Platform: iOS / iPadOS
12
+ Role: Color intelligence
13
+ Parent: knowledge/apple/visual-materials.md
14
+ Use with: MobileUI-OS
15
+
16
+
17
+ # 1. PURPOSE
18
+
19
+ Color is a structural system.
20
+
21
+ It communicates:
22
+
23
+ - hierarchy
24
+ - interaction
25
+ - state
26
+ - emphasis
27
+ - identity
28
+ - environment
29
+ - accessibility
30
+ - focus
31
+
32
+ The agent must not treat color as decoration added after layout.
33
+
34
+ Color decisions should emerge from the interface structure.
35
+
36
+
37
+ # 2. CORE PRINCIPLE
38
+
39
+ Never begin with:
40
+
41
+ > "Which hex color looks nice?"
42
+
43
+ Begin with:
44
+
45
+ ```text
46
+ What is this color communicating?
47
+ ````
48
+
49
+ Then define:
50
+
51
+ ```text
52
+ semantic role
53
+ ↓
54
+ appearance behavior
55
+ ↓
56
+ contrast requirements
57
+ ↓
58
+ actual color value
59
+ ```
60
+
61
+ # 3. COLOR SYSTEM
62
+
63
+ A mature application should have:
64
+
65
+ ```text
66
+ COLOR SYSTEM
67
+ │
68
+ ├── Background
69
+ ├── Surface
70
+ ├── Elevated Surface
71
+ ├── Text
72
+ ├── Icon
73
+ ├── Accent
74
+ ├── Selection
75
+ ├── Interaction
76
+ ├── Semantic
77
+ │ ├── Success
78
+ │ ├── Warning
79
+ │ ├── Error
80
+ │ └── Info
81
+ │
82
+ └── Decorative
83
+ ```
84
+
85
+ # 4. SEMANTIC COLORS
86
+
87
+ Prefer semantic tokens:
88
+
89
+ ```ts
90
+ colors.text.primary
91
+ colors.text.secondary
92
+ colors.surface.primary
93
+ colors.surface.elevated
94
+ colors.background.primary
95
+ colors.accent.primary
96
+ colors.border.subtle
97
+ colors.status.error
98
+ ```
99
+
100
+ instead of:
101
+
102
+ ```ts
103
+ "#FFFFFF"
104
+ "#000000"
105
+ "#007AFF"
106
+ ```
107
+
108
+ throughout the application.
109
+
110
+ # 5. WHY SEMANTIC COLORS MATTER
111
+
112
+ Semantic colors allow:
113
+
114
+ ```text
115
+ Light Mode
116
+ ↓
117
+ Light values
118
+
119
+ Dark Mode
120
+ ↓
121
+ Dark values
122
+ ```
123
+
124
+ without changing component logic.
125
+
126
+ The component asks:
127
+
128
+ ```text
129
+ "What role does this color have?"
130
+ ```
131
+
132
+ not:
133
+
134
+ ```text
135
+ "What hex value should I use?"
136
+ ```
137
+
138
+ # 6. COLOR HIERARCHY
139
+
140
+ A typical hierarchy:
141
+
142
+ ```text
143
+ PRIMARY
144
+ ↓
145
+ main content
146
+ main actions
147
+ selected state
148
+
149
+ SECONDARY
150
+ ↓
151
+ supporting information
152
+
153
+ TERTIARY
154
+ ↓
155
+ metadata
156
+ hints
157
+ less-important information
158
+
159
+ QUATERNARY
160
+ ↓
161
+ very subtle contextual content
162
+ ```
163
+
164
+ # 7. TEXT COLORS
165
+
166
+ Avoid using one color for every text element.
167
+
168
+ Use semantic hierarchy:
169
+
170
+ ```text
171
+ text.primary
172
+ text.secondary
173
+ text.tertiary
174
+ text.disabled
175
+ text.placeholder
176
+ text.inverse
177
+ ```
178
+
179
+ Example:
180
+
181
+ ```text
182
+ Title
183
+ ↓
184
+ primary
185
+
186
+ Subtitle
187
+ ↓
188
+ secondary
189
+
190
+ Metadata
191
+ ↓
192
+ tertiary
193
+ ```
194
+
195
+ # 8. PRIMARY TEXT
196
+
197
+ Primary text should have the strongest readable emphasis.
198
+
199
+ Typical uses:
200
+
201
+ ```text
202
+ headings
203
+ main labels
204
+ important values
205
+ primary content
206
+ ```
207
+
208
+ # 9. SECONDARY TEXT
209
+
210
+ Secondary text supports primary content.
211
+
212
+ Typical uses:
213
+
214
+ ```text
215
+ descriptions
216
+ supporting labels
217
+ secondary metadata
218
+ ```
219
+
220
+ # 10. TERTIARY TEXT
221
+
222
+ Tertiary text should communicate information that is useful but not dominant.
223
+
224
+ Examples:
225
+
226
+ ```text
227
+ timestamps
228
+ supplementary metadata
229
+ minor hints
230
+ ```
231
+
232
+ # 11. DISABLED TEXT
233
+
234
+ Disabled content should communicate unavailable interaction.
235
+
236
+ But:
237
+
238
+ ```text
239
+ disabled
240
+ ≠
241
+ invisible
242
+ ```
243
+
244
+ Users should still understand what exists.
245
+
246
+ # 12. PLACEHOLDER TEXT
247
+
248
+ Placeholder text should visually communicate:
249
+
250
+ ```text
251
+ temporary guidance
252
+ ```
253
+
254
+ rather than appear to be entered content.
255
+
256
+ Placeholder and entered text must be visually distinguishable.
257
+
258
+ # 13. INVERSE COLORS
259
+
260
+ Some surfaces require inverse content.
261
+
262
+ Example:
263
+
264
+ ```text
265
+ dark surface
266
+ ↓
267
+ light text
268
+ ```
269
+
270
+ or:
271
+
272
+ ```text
273
+ accent surface
274
+ ↓
275
+ high-contrast foreground
276
+ ```
277
+
278
+ Use semantic inverse tokens rather than manually selecting white/black.
279
+
280
+ # 14. BACKGROUND COLORS
281
+
282
+ Background establishes the environmental layer.
283
+
284
+ Possible roles:
285
+
286
+ ```text
287
+ background.primary
288
+ background.secondary
289
+ background.grouped
290
+ background.media
291
+ background.cinematic
292
+ ```
293
+
294
+ Only create additional background roles when hierarchy requires them.
295
+
296
+ # 15. SURFACE COLORS
297
+
298
+ Surfaces represent content containers.
299
+
300
+ Example:
301
+
302
+ ```text
303
+ background
304
+ ↓
305
+ surface
306
+ ↓
307
+ elevated surface
308
+ ```
309
+
310
+ Each level should have enough distinction to establish hierarchy.
311
+
312
+ # 16. GROUPED CONTENT
313
+
314
+ Grouped interfaces can use subtle tonal differences:
315
+
316
+ ```text
317
+ environment
318
+ ↓
319
+ group
320
+ ↓
321
+ row
322
+ ```
323
+
324
+ Avoid excessive cards and borders when tonal grouping is enough.
325
+
326
+ # 17. ACCENT COLOR
327
+
328
+ Accent color identifies primary interactive emphasis.
329
+
330
+ Examples:
331
+
332
+ ```text
333
+ selected tab
334
+ primary action
335
+ active control
336
+ link
337
+ progress
338
+ focused element
339
+ ```
340
+
341
+ # 18. ONE PRIMARY ACCENT
342
+
343
+ Most products should have a dominant accent.
344
+
345
+ Example:
346
+
347
+ ```text
348
+ accent.primary
349
+ ```
350
+
351
+ Additional accents should have defined roles.
352
+
353
+ Avoid rainbow interfaces unless the product intentionally requires them.
354
+
355
+ # 19. ACCENT SHOULD NOT CONTROL EVERYTHING
356
+
357
+ Do not make:
358
+
359
+ ```text
360
+ every icon
361
+ every border
362
+ every button
363
+ every heading
364
+ every card
365
+ ```
366
+
367
+ the accent color.
368
+
369
+ Accent is a hierarchy tool.
370
+
371
+ # 20. ACCENT DENSITY
372
+
373
+ If too many elements use the accent:
374
+
375
+ ```text
376
+ nothing feels primary
377
+ ```
378
+
379
+ Use neutral colors for most secondary content.
380
+
381
+ # 21. TINT
382
+
383
+ Tint can communicate interactive identity.
384
+
385
+ Conceptually:
386
+
387
+ ```text
388
+ neutral interface
389
+ +
390
+ accent tint
391
+ ↓
392
+ interactive identity
393
+ ```
394
+
395
+ Tint can appear in:
396
+
397
+ ```text
398
+ icons
399
+ controls
400
+ selection
401
+ progress
402
+ links
403
+ navigation
404
+ ```
405
+
406
+ # 22. SELECTED STATE
407
+
408
+ A selected state should be unmistakable.
409
+
410
+ Possible signals:
411
+
412
+ ```text
413
+ accent color
414
+ filled background
415
+ icon change
416
+ weight change
417
+ indicator
418
+ shape
419
+ ```
420
+
421
+ Use more than color alone when necessary.
422
+
423
+ # 23. SELECTION SHOULD BE LOCAL
424
+
425
+ Selected state should affect the selected element rather than turning an entire
426
+ screen into accent color.
427
+
428
+ # 24. INTERACTION COLORS
429
+
430
+ Define interaction states:
431
+
432
+ ```text
433
+ default
434
+ pressed
435
+ hovered
436
+ focused
437
+ selected
438
+ disabled
439
+ loading
440
+ ```
441
+
442
+ Not every platform needs every state.
443
+
444
+ # 25. PRESSED STATE
445
+
446
+ Pressed state should provide immediate feedback.
447
+
448
+ Possible changes:
449
+
450
+ ```text
451
+ opacity
452
+ surface tone
453
+ scale
454
+ material
455
+ tint
456
+ ```
457
+
458
+ Keep the change subtle.
459
+
460
+ # 26. FOCUS STATE
461
+
462
+ Focus should be visually clear.
463
+
464
+ Possible mechanisms:
465
+
466
+ ```text
467
+ outline
468
+ accent ring
469
+ contrast
470
+ surface change
471
+ ```
472
+
473
+ Do not rely solely on color shifts that are difficult to distinguish.
474
+
475
+ # 27. HOVER
476
+
477
+ For iPad pointer and desktop-like environments, hover may be appropriate.
478
+
479
+ Hover should not replace touch interaction feedback.
480
+
481
+ Think:
482
+
483
+ ```text
484
+ touch
485
+ ↓
486
+ pressed
487
+
488
+ pointer
489
+ ↓
490
+ hover + pressed
491
+ ```
492
+
493
+ # 28. DISABLED STATE
494
+
495
+ Disabled controls should generally reduce emphasis.
496
+
497
+ Possible changes:
498
+
499
+ ```text
500
+ opacity
501
+ contrast
502
+ surface
503
+ tint
504
+ ```
505
+
506
+ Do not make disabled controls completely disappear.
507
+
508
+ # 29. LOADING STATE
509
+
510
+ Loading should preserve the underlying semantic identity where possible.
511
+
512
+ Example:
513
+
514
+ ```text
515
+ Download
516
+ ↓
517
+ Loading
518
+ ```
519
+
520
+ The user should still understand:
521
+
522
+ ```text
523
+ what is happening
524
+ ```
525
+
526
+ # 30. SUCCESS
527
+
528
+ Success color communicates completed or positive state.
529
+
530
+ Typical semantic token:
531
+
532
+ ```text
533
+ status.success
534
+ ```
535
+
536
+ Do not use success green merely because it looks attractive.
537
+
538
+ # 31. WARNING
539
+
540
+ Warning indicates attention without necessarily indicating failure.
541
+
542
+ Use:
543
+
544
+ ```text
545
+ status.warning
546
+ ```
547
+
548
+ for:
549
+
550
+ ```text
551
+ potential problems
552
+ important conditions
553
+ actions requiring attention
554
+ ```
555
+
556
+ # 32. ERROR
557
+
558
+ Error indicates:
559
+
560
+ ```text
561
+ invalid state
562
+ failed operation
563
+ danger
564
+ destructive action
565
+ ```
566
+
567
+ Use strong enough contrast to be noticed.
568
+
569
+ Do not color the entire interface red.
570
+
571
+ # 33. INFO
572
+
573
+ Informational color communicates context rather than success or failure.
574
+
575
+ Use for:
576
+
577
+ ```text
578
+ tips
579
+ informational banners
580
+ system information
581
+ educational hints
582
+ ```
583
+
584
+ # 34. SEMANTIC COLOR TABLE
585
+
586
+ Conceptually:
587
+
588
+ ```text
589
+ success
590
+ positive result
591
+
592
+ warning
593
+ attention
594
+
595
+ error
596
+ failure/danger
597
+
598
+ info
599
+ contextual information
600
+ ```
601
+
602
+ These colors should have consistent meaning throughout the application.
603
+
604
+ # 35. COLOR MUST NOT BE THE ONLY SIGNAL
605
+
606
+ Never communicate:
607
+
608
+ ```text
609
+ error
610
+ selected
611
+ success
612
+ warning
613
+ ```
614
+
615
+ using color alone when the distinction matters.
616
+
617
+ Combine:
618
+
619
+ ```text
620
+ color
621
+ +
622
+ icon
623
+ +
624
+ text
625
+ +
626
+ shape
627
+ +
628
+ position
629
+ ```
630
+
631
+ where appropriate.
632
+
633
+ # 36. CONTRAST
634
+
635
+ Color decisions must preserve readability.
636
+
637
+ Evaluate:
638
+
639
+ ```text
640
+ foreground
641
+ vs
642
+ background
643
+ ```
644
+
645
+ rather than judging colors independently.
646
+
647
+ # 37. CONTRAST IS CONTEXTUAL
648
+
649
+ The same foreground color can have different perceived readability against:
650
+
651
+ ```text
652
+ white
653
+ gray
654
+ black
655
+ image
656
+ gradient
657
+ blur
658
+ ```
659
+
660
+ Therefore contrast must be evaluated in context.
661
+
662
+ # 38. DYNAMIC BACKGROUNDS
663
+
664
+ When content changes behind text:
665
+
666
+ ```text
667
+ background changes
668
+ ↓
669
+ contrast may change
670
+ ```
671
+
672
+ The UI must compensate.
673
+
674
+ Possible strategies:
675
+
676
+ ```text
677
+ adaptive foreground
678
+ overlay
679
+ blur
680
+ scrim
681
+ surface
682
+ text shadow where appropriate
683
+ ```
684
+
685
+ # 39. ARTWORK-DERIVED COLORS
686
+
687
+ For media applications:
688
+
689
+ ```text
690
+ artwork
691
+ ↓
692
+ palette extraction
693
+ ↓
694
+ candidate colors
695
+ ↓
696
+ contrast filtering
697
+ ↓
698
+ semantic mapping
699
+ ↓
700
+ UI palette
701
+ ```
702
+
703
+ Never directly use arbitrary extracted colors everywhere.
704
+
705
+ # 40. PALETTE EXTRACTION
706
+
707
+ A useful conceptual palette:
708
+
709
+ ```text
710
+ dominant
711
+ secondary
712
+ accent
713
+ darkest
714
+ lightest
715
+ ```
716
+
717
+ Then derive semantic roles.
718
+
719
+ Example:
720
+
721
+ ```text
722
+ dominant
723
+ ↓
724
+ background atmosphere
725
+
726
+ accent
727
+ ↓
728
+ interactive emphasis
729
+
730
+ darkest/lightest
731
+ ↓
732
+ contrast support
733
+ ```
734
+
735
+ # 41. PALETTE SAFETY
736
+
737
+ Extracted colors must pass:
738
+
739
+ ```text
740
+ contrast
741
+ brightness
742
+ saturation
743
+ semantic validity
744
+ ```
745
+
746
+ before becoming UI colors.
747
+
748
+ # 42. ARTWORK SHOULD NOT CONTROL UX
749
+
750
+ If artwork produces:
751
+
752
+ ```text
753
+ neon yellow
754
+ ```
755
+
756
+ the application should not automatically make:
757
+
758
+ ```text
759
+ all text neon yellow
760
+ all buttons neon yellow
761
+ all icons neon yellow
762
+ ```
763
+
764
+ The design system remains authoritative.
765
+
766
+ # 43. COLOR TRANSITIONS
767
+
768
+ When semantic colors change dynamically:
769
+
770
+ ```text
771
+ old
772
+ ↓
773
+ transition
774
+ ↓
775
+ new
776
+ ```
777
+
778
+ Use animation only when it improves continuity.
779
+
780
+ Do not animate every color update.
781
+
782
+ # 44. DARK MODE
783
+
784
+ Dark mode requires an independent color strategy.
785
+
786
+ Do not simply invert:
787
+
788
+ ```text
789
+ light → dark
790
+ ```
791
+
792
+ Instead design:
793
+
794
+ ```text
795
+ dark background
796
+ dark surface
797
+ dark elevated surface
798
+ dark text hierarchy
799
+ dark accent behavior
800
+ dark semantic states
801
+ ```
802
+
803
+ # 45. DARK BACKGROUND
804
+
805
+ Dark backgrounds should establish clear levels.
806
+
807
+ Example:
808
+
809
+ ```text
810
+ Level 0
811
+ deep background
812
+
813
+ Level 1
814
+ surface
815
+
816
+ Level 2
817
+ elevated surface
818
+
819
+ Level 3
820
+ overlay
821
+ ```
822
+
823
+ # 46. DARK TEXT
824
+
825
+ Avoid assuming:
826
+
827
+ ```text
828
+ white = best
829
+ ```
830
+
831
+ Pure white can appear overly bright in large amounts.
832
+
833
+ Use appropriate semantic emphasis.
834
+
835
+ # 47. DARK ACCENTS
836
+
837
+ Bright accent colors can become visually aggressive against dark surfaces.
838
+
839
+ Consider:
840
+
841
+ ```text
842
+ saturation
843
+ brightness
844
+ contrast
845
+ surface context
846
+ ```
847
+
848
+ before choosing the final accent.
849
+
850
+ # 48. LIGHT MODE
851
+
852
+ Light mode should maintain hierarchy without relying on large shadows.
853
+
854
+ Use:
855
+
856
+ ```text
857
+ surface difference
858
+ subtle borders
859
+ spacing
860
+ typography
861
+ controlled elevation
862
+ ```
863
+
864
+ where appropriate.
865
+
866
+ # 49. APPEARANCE ADAPTATION
867
+
868
+ Every important semantic token should answer:
869
+
870
+ ```text
871
+ What happens in light mode?
872
+ What happens in dark mode?
873
+ ```
874
+
875
+ Example:
876
+
877
+ ```ts
878
+ surface.primary = {
879
+ light: "...",
880
+ dark: "..."
881
+ }
882
+ ```
883
+
884
+ # 50. SYSTEM COLORS
885
+
886
+ When building an iOS-native experience, prefer system-aware semantic colors
887
+ where the platform provides an appropriate equivalent.
888
+
889
+ This helps the interface adapt to:
890
+
891
+ ```text
892
+ appearance
893
+ accessibility settings
894
+ system context
895
+ ```
896
+
897
+ # 51. CUSTOM BRAND COLORS
898
+
899
+ Brand colors should coexist with the system.
900
+
901
+ Define:
902
+
903
+ ```text
904
+ brand.primary
905
+ brand.secondary
906
+ ```
907
+
908
+ then map them into semantic roles.
909
+
910
+ Do not replace the entire system palette with brand color.
911
+
912
+ # 52. BRAND COLOR VS ACCENT
913
+
914
+ Brand color answers:
915
+
916
+ ```text
917
+ Who are we?
918
+ ```
919
+
920
+ Accent answers:
921
+
922
+ ```text
923
+ What should the user notice or interact with?
924
+ ```
925
+
926
+ They can be the same, but they do not have to be.
927
+
928
+ # 53. COLOR PERSONALITY
929
+
930
+ Color can influence perceived personality:
931
+
932
+ ```text
933
+ blue
934
+ ↓
935
+ calm / trustworthy
936
+
937
+ purple
938
+ ↓
939
+ creative / expressive
940
+
941
+ orange
942
+ ↓
943
+ energetic
944
+
945
+ green
946
+ ↓
947
+ positive / natural
948
+
949
+ red
950
+ ↓
951
+ urgent / destructive
952
+
953
+ neutral
954
+ ↓
955
+ quiet / premium
956
+ ```
957
+
958
+ These are tendencies, not universal meanings.
959
+
960
+ # 54. DO NOT OVERGENERALIZE COLOR PSYCHOLOGY
961
+
962
+ Color meaning depends on:
963
+
964
+ ```text
965
+ culture
966
+ context
967
+ product
968
+ brand
969
+ contrast
970
+ usage
971
+ ```
972
+
973
+ Use semantic meaning over generic psychology.
974
+
975
+ # 55. SATURATION
976
+
977
+ High saturation attracts attention.
978
+
979
+ Therefore:
980
+
981
+ ```text
982
+ high saturation
983
+ ↓
984
+ high visual weight
985
+ ```
986
+
987
+ Reserve it for intentional emphasis.
988
+
989
+ # 56. DESATURATION
990
+
991
+ Lower saturation can create:
992
+
993
+ ```text
994
+ quietness
995
+ secondary hierarchy
996
+ background atmosphere
997
+ ```
998
+
999
+ Use carefully because excessive desaturation can reduce clarity.
1000
+
1001
+ # 57. LUMINANCE
1002
+
1003
+ Luminance strongly affects visual hierarchy.
1004
+
1005
+ Conceptually:
1006
+
1007
+ ```text
1008
+ higher luminance contrast
1009
+ ↓
1010
+ stronger separation
1011
+ ```
1012
+
1013
+ Use luminance strategically.
1014
+
1015
+ # 58. COLOR TEMPERATURE
1016
+
1017
+ Warm/cool relationships can create atmosphere.
1018
+
1019
+ Example:
1020
+
1021
+ ```text
1022
+ cool background
1023
+ +
1024
+ warm accent
1025
+ ```
1026
+
1027
+ can establish strong contrast.
1028
+
1029
+ But do not introduce temperature variation without purpose.
1030
+
1031
+ # 59. MONOCHROMATIC SYSTEMS
1032
+
1033
+ A monochromatic interface can be extremely premium.
1034
+
1035
+ Example:
1036
+
1037
+ ```text
1038
+ neutral base
1039
+ +
1040
+ single accent
1041
+ +
1042
+ semantic states
1043
+ ```
1044
+
1045
+ This often produces stronger hierarchy than many competing colors.
1046
+
1047
+ # 60. NEUTRAL PALETTE
1048
+
1049
+ Neutrals are the foundation of most interfaces.
1050
+
1051
+ Define a neutral scale:
1052
+
1053
+ ```text
1054
+ neutral.50
1055
+ neutral.100
1056
+ neutral.200
1057
+ ...
1058
+ neutral.900
1059
+ neutral.950
1060
+ ```
1061
+
1062
+ Then map semantic roles to the scale.
1063
+
1064
+ # 61. DO NOT USE RAW NEUTRALS EVERYWHERE
1065
+
1066
+ Instead of:
1067
+
1068
+ ```text
1069
+ gray-500
1070
+ gray-700
1071
+ gray-900
1072
+ ```
1073
+
1074
+ prefer:
1075
+
1076
+ ```text
1077
+ text.secondary
1078
+ text.primary
1079
+ surface.elevated
1080
+ ```
1081
+
1082
+ The semantic layer controls implementation.
1083
+
1084
+ # 62. COLOR TOKENS
1085
+
1086
+ A mature design system may contain:
1087
+
1088
+ ```ts
1089
+ color = {
1090
+ background: {
1091
+ primary,
1092
+ secondary,
1093
+ grouped,
1094
+ },
1095
+
1096
+ surface: {
1097
+ primary,
1098
+ secondary,
1099
+ elevated,
1100
+ overlay,
1101
+ },
1102
+
1103
+ text: {
1104
+ primary,
1105
+ secondary,
1106
+ tertiary,
1107
+ disabled,
1108
+ inverse,
1109
+ },
1110
+
1111
+ icon: {
1112
+ primary,
1113
+ secondary,
1114
+ disabled,
1115
+ accent,
1116
+ },
1117
+
1118
+ border: {
1119
+ subtle,
1120
+ strong,
1121
+ },
1122
+
1123
+ accent: {
1124
+ primary,
1125
+ secondary,
1126
+ },
1127
+
1128
+ status: {
1129
+ success,
1130
+ warning,
1131
+ error,
1132
+ info,
1133
+ }
1134
+ }
1135
+ ```
1136
+
1137
+ # 63. COLOR ALIASES
1138
+
1139
+ Use aliases to connect raw palette values to semantics.
1140
+
1141
+ Example:
1142
+
1143
+ ```ts
1144
+ palette.blue500
1145
+
1146
+ ↓
1147
+
1148
+ color.accent.primary
1149
+ ```
1150
+
1151
+ This makes global redesign easier.
1152
+
1153
+ # 64. RAW PALETTE VS SEMANTIC PALETTE
1154
+
1155
+ Separate:
1156
+
1157
+ ```text
1158
+ RAW PALETTE
1159
+ ↓
1160
+ blue500
1161
+ gray900
1162
+ purple500
1163
+
1164
+ SEMANTIC PALETTE
1165
+ ↓
1166
+ accent.primary
1167
+ text.primary
1168
+ surface.primary
1169
+ ```
1170
+
1171
+ Components should consume the semantic layer.
1172
+
1173
+ # 65. GRADIENT SYSTEM
1174
+
1175
+ Gradients should have semantic roles.
1176
+
1177
+ Example:
1178
+
1179
+ ```text
1180
+ gradient.hero
1181
+ gradient.media
1182
+ gradient.accent
1183
+ gradient.overlay
1184
+ ```
1185
+
1186
+ Do not define random gradients per component.
1187
+
1188
+ # 66. GRADIENT DIRECTION
1189
+
1190
+ Gradient direction can reinforce composition.
1191
+
1192
+ Example:
1193
+
1194
+ ```text
1195
+ content subject
1196
+ ↓
1197
+ strong color region
1198
+ ↓
1199
+ text region
1200
+ ```
1201
+
1202
+ Position the gradient to support readability.
1203
+
1204
+ # 67. GRADIENT CONTRAST
1205
+
1206
+ When text overlays a gradient:
1207
+
1208
+ ```text
1209
+ text
1210
+ ↓
1211
+ gradient
1212
+ ↓
1213
+ background
1214
+ ```
1215
+
1216
+ test the weakest-contrast region.
1217
+
1218
+ Do not evaluate only the average appearance.
1219
+
1220
+ # 68. SCRIMS
1221
+
1222
+ A scrim is a controlled overlay used to improve contrast.
1223
+
1224
+ Conceptually:
1225
+
1226
+ ```text
1227
+ image
1228
+ +
1229
+ dark/light overlay
1230
+ +
1231
+ foreground content
1232
+ ```
1233
+
1234
+ Useful for:
1235
+
1236
+ ```text
1237
+ hero imagery
1238
+ video
1239
+ media player
1240
+ dialogs
1241
+ ```
1242
+
1243
+ Use the minimum strength necessary.
1244
+
1245
+ # 69. COLOR + MATERIAL
1246
+
1247
+ Color and material should cooperate.
1248
+
1249
+ Example:
1250
+
1251
+ ```text
1252
+ accent tint
1253
+ +
1254
+ translucent surface
1255
+ ```
1256
+
1257
+ can create a contextual material.
1258
+
1259
+ Do not simply stack opacity and color until something looks interesting.
1260
+
1261
+ # 70. COLOR + SHADOW
1262
+
1263
+ Shadows should generally remain neutral unless a colored shadow has a deliberate
1264
+ visual purpose.
1265
+
1266
+ Large saturated shadows often create a decorative rather than native look.
1267
+
1268
+ # 71. COLOR + TYPOGRAPHY
1269
+
1270
+ Typography hierarchy can be reinforced by color.
1271
+
1272
+ Example:
1273
+
1274
+ ```text
1275
+ heading
1276
+ ↓
1277
+ primary
1278
+
1279
+ body
1280
+ ↓
1281
+ secondary
1282
+
1283
+ metadata
1284
+ ↓
1285
+ tertiary
1286
+ ```
1287
+
1288
+ But typography size/weight should still carry hierarchy independently.
1289
+
1290
+ # 72. COLOR + SPACING
1291
+
1292
+ Color cannot compensate for poor spacing.
1293
+
1294
+ If two sections are visually confusing:
1295
+
1296
+ First evaluate:
1297
+
1298
+ ```text
1299
+ spacing
1300
+ grouping
1301
+ typography
1302
+ ```
1303
+
1304
+ before adding more colors.
1305
+
1306
+ # 73. COLOR + MOTION
1307
+
1308
+ A selected state may transition:
1309
+
1310
+ ```text
1311
+ neutral
1312
+ ↓
1313
+ accent
1314
+ ```
1315
+
1316
+ Motion communicates the change while color communicates the resulting state.
1317
+
1318
+ # 74. COLOR + HAPTICS
1319
+
1320
+ Important color/state changes may be reinforced by haptics.
1321
+
1322
+ Example:
1323
+
1324
+ ```text
1325
+ selection
1326
+ ↓
1327
+ visual accent
1328
+ +
1329
+ subtle haptic
1330
+ ```
1331
+
1332
+ Only use additional feedback when the state change matters.
1333
+
1334
+ # 75. COLOR DENSITY
1335
+
1336
+ Color density measures how much strong color is present.
1337
+
1338
+ High color density:
1339
+
1340
+ ```text
1341
+ high attention
1342
+ high energy
1343
+ ```
1344
+
1345
+ Low color density:
1346
+
1347
+ ```text
1348
+ quiet
1349
+ focused
1350
+ premium
1351
+ ```
1352
+
1353
+ Most content-heavy applications benefit from restrained color density.
1354
+
1355
+ # 76. PREMIUM COLOR SYSTEM
1356
+
1357
+ A premium interface often uses:
1358
+
1359
+ ```text
1360
+ large neutral foundation
1361
+ +
1362
+ one dominant accent
1363
+ +
1364
+ small semantic accents
1365
+ +
1366
+ strong typography hierarchy
1367
+ ```
1368
+
1369
+ rather than many competing colors.
1370
+
1371
+ # 77. COLOR NOISE
1372
+
1373
+ Avoid:
1374
+
1375
+ ```text
1376
+ blue button
1377
+ green card
1378
+ purple badge
1379
+ orange icon
1380
+ red label
1381
+ yellow banner
1382
+ ```
1383
+
1384
+ unless each color has semantic meaning.
1385
+
1386
+ Random color variety destroys hierarchy.
1387
+
1388
+ # 78. BADGE COLORS
1389
+
1390
+ Badges should use semantic or categorical color.
1391
+
1392
+ Examples:
1393
+
1394
+ ```text
1395
+ status
1396
+ category
1397
+ priority
1398
+ availability
1399
+ ```
1400
+
1401
+ If badges are purely decorative, consider reducing their color intensity.
1402
+
1403
+ # 79. TAG SYSTEMS
1404
+
1405
+ For user-defined tags, color can help categorization.
1406
+
1407
+ But:
1408
+
1409
+ ```text
1410
+ color
1411
+ +
1412
+ label
1413
+ ```
1414
+
1415
+ should remain understandable if color perception differs.
1416
+
1417
+ # 80. AVATAR COLORS
1418
+
1419
+ Generated avatar backgrounds may use controlled palette values.
1420
+
1421
+ Avoid random high-saturation colors that clash with the design system.
1422
+
1423
+ # 81. DATA VISUALIZATION
1424
+
1425
+ When displaying multiple data categories:
1426
+
1427
+ Do not rely solely on color.
1428
+
1429
+ Use:
1430
+
1431
+ ```text
1432
+ color
1433
+ +
1434
+ shape
1435
+ +
1436
+ pattern
1437
+ +
1438
+ label
1439
+ ```
1440
+
1441
+ where appropriate.
1442
+
1443
+ # 82. ACCESSIBLE PALETTES
1444
+
1445
+ Before shipping, test:
1446
+
1447
+ ```text
1448
+ normal vision
1449
+ reduced contrast conditions
1450
+ color vision differences
1451
+ dark mode
1452
+ light mode
1453
+ dynamic backgrounds
1454
+ ```
1455
+
1456
+ The interface must remain understandable.
1457
+
1458
+ # 83. COLOR BLINDNESS
1459
+
1460
+ Do not assume:
1461
+
1462
+ ```text
1463
+ red vs green
1464
+ ```
1465
+
1466
+ is sufficient to communicate:
1467
+
1468
+ ```text
1469
+ error vs success
1470
+ ```
1471
+
1472
+ Add semantic indicators.
1473
+
1474
+ # 84. FOCUS VISIBILITY
1475
+
1476
+ Keyboard/pointer users require clear focus indication.
1477
+
1478
+ A focus ring should be:
1479
+
1480
+ ```text
1481
+ visible
1482
+ distinct
1483
+ consistent
1484
+ non-destructive to layout
1485
+ ```
1486
+
1487
+ # 85. HIGH CONTRAST
1488
+
1489
+ When accessibility settings increase contrast:
1490
+
1491
+ The interface should preserve:
1492
+
1493
+ ```text
1494
+ semantic hierarchy
1495
+ interactive distinction
1496
+ readability
1497
+ ```
1498
+
1499
+ rather than collapsing into visual confusion.
1500
+
1501
+ # 86. REDUCED TRANSPARENCY
1502
+
1503
+ If the user reduces transparency:
1504
+
1505
+ ```text
1506
+ translucent surfaces
1507
+ ```
1508
+
1509
+ may need to become:
1510
+
1511
+ ```text
1512
+ more opaque surfaces
1513
+ ```
1514
+
1515
+ The design system should preserve hierarchy.
1516
+
1517
+ # 87. SYSTEM APPEARANCE
1518
+
1519
+ Color should adapt to:
1520
+
1521
+ ```text
1522
+ light
1523
+ dark
1524
+ system appearance
1525
+ ```
1526
+
1527
+ without requiring each screen to implement its own branching logic.
1528
+
1529
+ # 88. COLOR ARCHITECTURE
1530
+
1531
+ Recommended structure:
1532
+
1533
+ ```text
1534
+ design-system/
1535
+ color/
1536
+ palette.ts
1537
+ semantic.ts
1538
+ light.ts
1539
+ dark.ts
1540
+ accessibility.ts
1541
+ gradients.ts
1542
+ artwork.ts
1543
+ ```
1544
+
1545
+ The exact implementation depends on the project.
1546
+
1547
+ # 89. COLOR RESOLVER
1548
+
1549
+ Advanced systems can conceptually use:
1550
+
1551
+ ```ts
1552
+ resolveColor(
1553
+ semanticRole,
1554
+ appearance,
1555
+ contrastMode
1556
+ )
1557
+ ```
1558
+
1559
+ Example:
1560
+
1561
+ ```text
1562
+ resolveColor(
1563
+ "text.primary",
1564
+ "dark",
1565
+ "standard"
1566
+ )
1567
+ ```
1568
+
1569
+ returns the appropriate implementation value.
1570
+
1571
+ # 90. ARTWORK COLOR RESOLVER
1572
+
1573
+ Media applications may use:
1574
+
1575
+ ```ts
1576
+ resolveArtworkTheme(
1577
+ artwork,
1578
+ appearance,
1579
+ contrast
1580
+ )
1581
+ ```
1582
+
1583
+ which produces:
1584
+
1585
+ ```text
1586
+ background
1587
+ surface
1588
+ accent
1589
+ foreground
1590
+ ```
1591
+
1592
+ but only after validation.
1593
+
1594
+ # 91. SAFE ARTWORK ALGORITHM
1595
+
1596
+ Conceptual flow:
1597
+
1598
+ ```text
1599
+ ARTWORK
1600
+ ↓
1601
+ extract palette
1602
+ ↓
1603
+ remove unusable colors
1604
+ ↓
1605
+ evaluate luminance
1606
+ ↓
1607
+ evaluate saturation
1608
+ ↓
1609
+ generate candidates
1610
+ ↓
1611
+ test contrast
1612
+ ↓
1613
+ map semantic roles
1614
+ ↓
1615
+ render
1616
+ ```
1617
+
1618
+ # 92. COLOR STABILITY
1619
+
1620
+ Dynamic palettes should not change dramatically for tiny differences in input.
1621
+
1622
+ Avoid:
1623
+
1624
+ ```text
1625
+ tiny artwork change
1626
+ ↓
1627
+ completely different UI palette
1628
+ ```
1629
+
1630
+ This creates visual instability.
1631
+
1632
+ # 93. COLOR TRANSITION STABILITY
1633
+
1634
+ If dynamic colors change:
1635
+
1636
+ ```text
1637
+ palette A
1638
+ ↓
1639
+ interpolate
1640
+ ↓
1641
+ palette B
1642
+ ```
1643
+
1644
+ rather than abruptly switching every semantic token simultaneously.
1645
+
1646
+ # 94. COLOR CACHE
1647
+
1648
+ For media applications, consider caching derived palettes.
1649
+
1650
+ Example:
1651
+
1652
+ ```text
1653
+ track ID
1654
+ ↓
1655
+ artwork hash
1656
+ ↓
1657
+ cached palette
1658
+ ```
1659
+
1660
+ This reduces repeated processing.
1661
+
1662
+ # 95. COLOR PERFORMANCE
1663
+
1664
+ Avoid expensive color extraction during critical interaction.
1665
+
1666
+ Bad:
1667
+
1668
+ ```text
1669
+ user presses play
1670
+ ↓
1671
+ decode huge artwork
1672
+ ↓
1673
+ extract palette
1674
+ ↓
1675
+ block UI
1676
+ ```
1677
+
1678
+ Better:
1679
+
1680
+ ```text
1681
+ playback starts
1682
+ ↓
1683
+ visual processing asynchronously
1684
+ ↓
1685
+ palette updates when ready
1686
+ ```
1687
+
1688
+ # 96. COLOR FAILURE
1689
+
1690
+ If dynamic palette generation fails:
1691
+
1692
+ ```text
1693
+ fallback semantic palette
1694
+ ```
1695
+
1696
+ must exist.
1697
+
1698
+ Never allow the UI to become unreadable because artwork processing failed.
1699
+
1700
+ # 97. DESIGN SYSTEM FALLBACK
1701
+
1702
+ Recommended:
1703
+
1704
+ ```text
1705
+ dynamic color
1706
+ ↓
1707
+ if valid → use dynamic palette
1708
+
1709
+ if invalid
1710
+ ↓
1711
+ use static semantic palette
1712
+ ```
1713
+
1714
+ The fallback must always be visually coherent.
1715
+
1716
+ # 98. COLOR REVIEW
1717
+
1718
+ For every screen ask:
1719
+
1720
+ ```text
1721
+ What is the dominant color?
1722
+
1723
+ What is the primary action?
1724
+
1725
+ What is neutral?
1726
+
1727
+ What is semantic?
1728
+
1729
+ What is decorative?
1730
+
1731
+ What is selected?
1732
+
1733
+ What is disabled?
1734
+
1735
+ What is the contrast hierarchy?
1736
+
1737
+ How does this behave in dark mode?
1738
+
1739
+ How does this behave in light mode?
1740
+
1741
+ Can state be understood without color?
1742
+ ```
1743
+
1744
+ # 99. COLOR ANTI-PATTERNS
1745
+
1746
+ Reject:
1747
+
1748
+ ```text
1749
+ random hex values
1750
+ rainbow UI
1751
+ accent everywhere
1752
+ red/green-only state communication
1753
+ pure white text everywhere
1754
+ pure black surfaces everywhere
1755
+ uncontrolled artwork colors
1756
+ different semantic colors per screen
1757
+ gradient everywhere
1758
+ color used to compensate for poor layout
1759
+ ```
1760
+
1761
+ # 100. AGENT COLOR DECISION MODEL
1762
+
1763
+ ```text
1764
+ ELEMENT
1765
+ ↓
1766
+ WHAT ROLE?
1767
+ ↓
1768
+ SEMANTIC TOKEN
1769
+ ↓
1770
+ APPEARANCE
1771
+ ↓
1772
+ CONTEXT
1773
+ ↓
1774
+ CONTRAST
1775
+ ↓
1776
+ ACTUAL COLOR
1777
+ ```
1778
+
1779
+ Never reverse this process:
1780
+
1781
+ ```text
1782
+ pick hex
1783
+ ↓
1784
+ find somewhere to use it
1785
+ ```
1786
+
1787
+ # 101. COLOR QUALITY TEST
1788
+
1789
+ Temporarily remove all accent colors.
1790
+
1791
+ Ask:
1792
+
1793
+ ```text
1794
+ Does the hierarchy still work?
1795
+ ```
1796
+
1797
+ If no:
1798
+
1799
+ The interface may be relying too heavily on color.
1800
+
1801
+ # 102. GRAYSCALE TEST
1802
+
1803
+ Convert the interface conceptually to grayscale.
1804
+
1805
+ Ask:
1806
+
1807
+ ```text
1808
+ Can I still identify:
1809
+
1810
+ primary action?
1811
+ selected state?
1812
+ content hierarchy?
1813
+ sections?
1814
+ important information?
1815
+ ```
1816
+
1817
+ If yes:
1818
+
1819
+ The underlying hierarchy is strong.
1820
+
1821
+ # 103. COLOR BALANCE TEST
1822
+
1823
+ Look at the entire screen from a distance.
1824
+
1825
+ Ask:
1826
+
1827
+ ```text
1828
+ Where does my eye go first?
1829
+ ```
1830
+
1831
+ That should generally correspond to the intended hierarchy.
1832
+
1833
+ # 104. COLOR COMPETITION TEST
1834
+
1835
+ Identify the three strongest colors.
1836
+
1837
+ If multiple unrelated elements compete for attention:
1838
+
1839
+ ```text
1840
+ reduce saturation
1841
+ reduce area
1842
+ reduce contrast
1843
+ or remove color
1844
+ ```
1845
+
1846
+ # 105. FINAL COLOR PRINCIPLE
1847
+
1848
+ The best color systems do not maximize color.
1849
+
1850
+ They maximize:
1851
+
1852
+ ```text
1853
+ meaning
1854
+ clarity
1855
+ hierarchy
1856
+ adaptability
1857
+ accessibility
1858
+ identity
1859
+ ```
1860
+
1861
+ Color should make the interface easier to understand.
1862
+
1863
+ # 106. FINAL AGENT RULE
1864
+
1865
+ Before choosing a color, the agent must answer:
1866
+
1867
+ > "What semantic role does this color perform?"
1868
+
1869
+ If the answer is:
1870
+
1871
+ ```text
1872
+ "It looks good."
1873
+ ```
1874
+
1875
+ do not use it yet.
1876
+
1877
+ If the answer is:
1878
+
1879
+ ```text
1880
+ "It identifies the primary action."
1881
+ "It communicates an error."
1882
+ "It separates this surface."
1883
+ "It establishes selected state."
1884
+ "It maintains hierarchy in dark mode."
1885
+ "It preserves readability over dynamic artwork."
1886
+ ```
1887
+
1888
+ then the color has a defensible purpose.
1889
+
1890
+ # 107. QUICK REFERENCE
1891
+
1892
+ ```text
1893
+ SEMANTIC ROLE
1894
+ ↓
1895
+ APPEARANCE
1896
+ ↓
1897
+ CONTEXT
1898
+ ↓
1899
+ CONTRAST
1900
+ ↓
1901
+ HIERARCHY
1902
+ ↓
1903
+ COLOR
1904
+ ```
1905
+
1906
+ Color is the output of the system,
1907
+ not the starting point.
1908
+
1909
+ # 108. SOURCES
1910
+
1911
+ Apple Human Interface Guidelines:
1912
+
1913
+ [https://developer.apple.com/design/human-interface-guidelines/](https://developer.apple.com/design/human-interface-guidelines/)
1914
+
1915
+ Apple Design:
1916
+
1917
+ [https://developer.apple.com/design/](https://developer.apple.com/design/)
1918
+
1919
+ Apple Developer — SwiftUI:
1920
+
1921
+ [https://developer.apple.com/documentation/swiftui/](https://developer.apple.com/documentation/swiftui/)
1922
+
1923
+ Apple Developer — UIKit:
1924
+
1925
+ [https://developer.apple.com/documentation/uikit/](https://developer.apple.com/documentation/uikit/)
1926
+
1927
+ Apple Developer — Accessibility:
1928
+
1929
+ [https://developer.apple.com/accessibility/](https://developer.apple.com/accessibility/)
1930
+
1931
+ ````
1932
+
1933
+