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.
$ aoe 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.
Meta
- License: MIT AND Apache-2.0
- License Provenance: legacy-backfill
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.
Meta
- License: MIT AND Apache-2.0
- License Provenance: legacy-backfill
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.
Relations
related: [@community/rule-ios-custom-color-dark-variants, @community/fact-ios-background-hierarchy, @community/check-ios-increase-contrast]
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.
Meta
- License: MIT AND Apache-2.0
- License Provenance: legacy-backfill
Applies To
all foreground and background color assignments in iOS UI elements
Source
aoe-engine/examples/frontend-design/primes/compiled/@community/rule-ios-semantic-system-colors/atom.yaml