Package: nativephp/mobile-ui 0.4.0, reproduces on current main
Platforms: iOS 26 and Android
A PR follows this issue.
Steps to reproduce
<column class="bg-zinc-950 p-4">
<text>Hello</text>
<icon name="house" />
</column>
Expected: readable text and icon in the platform's primary / on-surface colour, which is what the renderers' own fall-through intends.
Actual: both are pure black on both platforms. On Android, composed text (runs with spans) is black as well.
Cause
NativeUITextRenderer.swift, NativeUIIconRenderer.swift, TextRenderer.kt and IconRenderer.kt read the color prop with a default of 0xFF000000. Each contains a branch that falls through to .primary (iOS) or theme.onSurface (Android) when the colour is 0, but that branch can never run because the default is never 0.
Proposed fix
Default the prop to 0 so the existing fall-through applies. For composed text, leave run colours unspecified when unset so the enclosing Text supplies on-surface. Text and icons with an explicit colour class are unaffected.
Files involved
resources/ios/NativeUITextRenderer.swift, resources/ios/NativeUIIconRenderer.swift, resources/android/TextRenderer.kt, resources/android/IconRenderer.kt.
Package: nativephp/mobile-ui 0.4.0, reproduces on current
mainPlatforms: iOS 26 and Android
A PR follows this issue.
Steps to reproduce
Expected: readable text and icon in the platform's primary / on-surface colour, which is what the renderers' own fall-through intends.
Actual: both are pure black on both platforms. On Android, composed text (runs with spans) is black as well.
Cause
NativeUITextRenderer.swift,NativeUIIconRenderer.swift,TextRenderer.ktandIconRenderer.ktread thecolorprop with a default of0xFF000000. Each contains a branch that falls through to.primary(iOS) ortheme.onSurface(Android) when the colour is0, but that branch can never run because the default is never0.Proposed fix
Default the prop to
0so the existing fall-through applies. For composed text, leave run colours unspecified when unset so the enclosingTextsupplies on-surface. Text and icons with an explicit colour class are unaffected.Files involved
resources/ios/NativeUITextRenderer.swift,resources/ios/NativeUIIconRenderer.swift,resources/android/TextRenderer.kt,resources/android/IconRenderer.kt.