Skip to content

docs: make the 0xAARRGGBB color format explicit (vs CSS hex) - #64

Merged
GenericJam merged 1 commit into
masterfrom
docs-explicit-argb-colors
Jul 5, 2026
Merged

docs: make the 0xAARRGGBB color format explicit (vs CSS hex)#64
GenericJam merged 1 commit into
masterfrom
docs-explicit-argb-colors

Conversation

@GenericJam

Copy link
Copy Markdown
Owner

Why

Color props accept raw colors as 0xAARRGGBB integer literals (alpha first). That's easy to get wrong coming from web/CSS habits — and coding assistants especially default to two wrong things:

  1. A CSS "#RRGGBB"string (Mob wants an 0x…integer).
  2. Alpha last (#RRGGBBAA) — Mob is alpha first (0xAARRGGBB), matching the native Android Color-int / iOS ARGB convention. Wrong alpha position gives a wrong color, not just wrong opacity.

The theming guide previously showed a single opaque example (0xFFFF5733) without spelling any of this out.

Change (docs-only)

  • guides/theming.md — new "Raw colors are 0xAARRGGBB integers, not CSS hex strings" section: it's an integer literal not a string; alpha is the first byte; always include the alpha byte (a 6-digit value is read as alpha 00 = transparent); and a note that the alpha byte is what makes a translucent/frosted panel composable from primitives (no special "glass" primitive needed) with a 0x66000000 scrim example.
  • guides/components.md — added a "Raw colors" bullet to the prop-value reference cross-linking the theming section.

No code paths touched.

🤖 Generated with Claude Code

Color props accept raw colors as 0xAARRGGBB integer literals (alpha first),
which is easy to get wrong coming from web/CSS habits — coding assistants
especially default to "#RRGGBB" strings and alpha-last. The theming guide only
showed one opaque example without spelling out the format.
Add an explicit "Raw colors are 0xAARRGGBB integers, not CSS hex strings"
section: it's an integer literal not a string, alpha is the FIRST byte (not
last like CSS #RRGGBBAA), always include the alpha byte (a 6-digit value reads
as alpha 00 = transparent), and show that the alpha byte is what makes a
translucent/frosted panel composable from primitives. Cross-link it from the
components prop-value reference.
Docs-only.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@GenericJam
GenericJam merged commit f6c6308 into masterJul 5, 2026
4 checks passed
GenericJam added a commit that referenced this pull request Jul 5, 2026
Ships MOB-14 (#62): Mob.Device.network_state/0 + online?/0 + the :network
subscribe category. %{online, transport, expensive, validated, constrained},
with :unavailable where a platform can't answer. iOS NWPathMonitor + Android
ConnectivityManager.NetworkCallback (Kotlin bridge via mob_new 0.4.18+).
Device-verified on iOS sim + moto g power (2021). Also ships doc fixes#63/#64.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GenericJam added a commit that referenced this pull request Jul 5, 2026
Ships MOB-20 (#66): Mob.Device.keep_awake/1 prevents screen auto-dim/lock, no
permission. Device-verified both directions on moto g power (2021) + iPhone SE
(3rd gen). Android Kotlin bridge ships via mob_new 0.4.19+.
(0.7.16 was taken by the parallel connectivity release, which already folded in
the docs from #63/#64 — so #65 is superseded.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GenericJam added a commit that referenced this pull request Sep 1, 2026
Records the two merged doc-only PRs under a new [0.7.16] section so they're
ready for the next release (doc changes only reach hexdocs via a publish).
No mix.exs bump — this stages the entry without triggering release.yml.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@GenericJam