Ios Semantic System Colors
Use iOS semantic system colors — Color.primary, Color.secondary, Color(UIColor.systemBackground), Color(UIColor.label), etc. — rather than hardcoded hex or named colors for all text and backgrounds.
$ prime install @community/rule-ios-semantic-system-colors Projection
Always in _index.xml · the agent never has to ask for this.
IosSemanticSystemColors [rule] v1.0.0
Use iOS semantic system colors — Color.primary, Color.secondary, Color(UIColor.systemBackground), Color(UIColor.label), etc. — rather than hardcoded hex or named colors for all text and backgrounds.
Loaded when retrieval picks the atom as adjacent / supporting.
IosSemanticSystemColors [rule] v1.0.0
Use iOS semantic system colors — Color.primary, Color.secondary, Color(UIColor.systemBackground), Color(UIColor.label), etc. — rather than hardcoded hex or named colors for all text and backgrounds.
Applies To
all foreground and background color assignments in iOS UI elements
Loaded when retrieval picks the atom as a focal / direct hit.
IosSemanticSystemColors [rule] v1.0.0
Use iOS semantic system colors — Color.primary, Color.secondary, Color(UIColor.systemBackground), Color(UIColor.label), etc. — rather than hardcoded hex or named colors for all text and backgrounds.
Applies To
all foreground and background color assignments in iOS UI elements
Examples
- Text: Color.primary (black in light, white in dark), Color.secondary (grey in both).
- Backgrounds: Color(UIColor.systemBackground) for primary surface, Color(UIColor.secondarySystemBackground) for cards.
- Destructive: Color.red → use Color(UIColor.systemRed) which also adapts to high-contrast mode.
- Verify: toggle between light and dark mode; all text and surfaces remain legible without inversion artifacts.
Rationale
Hardcoded colors like .black or .white become invisible or glaring when the system appearance changes. Semantic system colors adapt automatically to light, dark, and high-contrast appearances without any extra code.
Applies To
all foreground and background color assignments in iOS UI elements
Source
prime-system/examples/frontend-design/primes/compiled/@community/rule-ios-semantic-system-colors/atom.yaml