Ios Custom Color Dark Variants
Every custom color in an iOS app must define both Any Appearance and Dark Appearance variants in the asset catalog (.xcassets) so it adapts automatically when the system appearance changes.
$ prime install @community/rule-ios-custom-color-dark-variants Projection
Always in _index.xml · the agent never has to ask for this.
IosCustomColorDarkVariants [rule] v1.0.0
Every custom color in an iOS app must define both Any Appearance and Dark Appearance variants in the asset catalog (.xcassets) so it adapts automatically when the system appearance changes.
Loaded when retrieval picks the atom as adjacent / supporting.
IosCustomColorDarkVariants [rule] v1.0.0
Every custom color in an iOS app must define both Any Appearance and Dark Appearance variants in the asset catalog (.xcassets) so it adapts automatically when the system appearance changes.
Applies To
all custom or brand colors added to an iOS app's color assets
Loaded when retrieval picks the atom as a focal / direct hit.
IosCustomColorDarkVariants [rule] v1.0.0
Every custom color in an iOS app must define both Any Appearance and Dark Appearance variants in the asset catalog (.xcassets) so it adapts automatically when the system appearance changes.
Applies To
all custom or brand colors added to an iOS app's color assets
Examples
- BrandBlue: light variant #0057FF; dark variant #4D90FF (lightened for dark backgrounds).
- Verify by switching to dark mode in Settings — custom colors should adjust, not invert or disappear.
Rationale
A single-variant custom color will look wrong in the opposing appearance mode — a bright brand color designed for light backgrounds can become glaring or invisible in dark mode. The asset catalog's appearance-variant system is the correct iOS mechanism for this.
Applies To
all custom or brand colors added to an iOS app's color assets
Source
prime-system/examples/frontend-design/primes/compiled/@community/rule-ios-custom-color-dark-variants/atom.yaml