RORK LABJP
VERIFY — Android developer verification becomes fully mandatory in September 2026. On Android 17 devices verification lives in the OS, so unverified apps can be blocked from new installs at the OS levelREVIEW — From September, responses are required when submitting new apps or updates to the App Store, and when notarizing for alternative distributionSDK — iOS 27 and Xcode 27 are expected to ship in September, but the requirement to submit iOS 27 SDK builds does not land until spring 2027TIMELINE — Rork's $15M seed and the Paperline acquisition were announced on April 9, 2026 — worth dating precisely rather than treating as breaking newsMAX — Rork Max emits native Swift for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessage, while standard Rork generates cross-platform apps with React Native (Expo)EXPORT — If the automated Publish step fails, you can sync to GitHub and export the full React Native source for free, then finish the submission by handVERIFY — Android developer verification becomes fully mandatory in September 2026. On Android 17 devices verification lives in the OS, so unverified apps can be blocked from new installs at the OS levelREVIEW — From September, responses are required when submitting new apps or updates to the App Store, and when notarizing for alternative distributionSDK — iOS 27 and Xcode 27 are expected to ship in September, but the requirement to submit iOS 27 SDK builds does not land until spring 2027TIMELINE — Rork's $15M seed and the Paperline acquisition were announced on April 9, 2026 — worth dating precisely rather than treating as breaking newsMAX — Rork Max emits native Swift for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessage, while standard Rork generates cross-platform apps with React Native (Expo)EXPORT — If the automated Publish step fails, you can sync to GitHub and export the full React Native source for free, then finish the submission by hand
Articles/App Dev
App Dev/2026-08-06Advanced

Deciding overlay text legibility at ingest time instead of on device — four metrics measured side by side

Moving the question of whether text stays readable over a wallpaper out of the device and into the content pipeline. Four candidate metrics measured across 240 images, including what downscaled judging actually computes.

Rork527Expo158React Native219Image Processing2Accessibility4Content Pipeline

Premium Article

A night-sky wallpaper opened, and there was a faint dark band across the top of the screen. The image is almost entirely black, with a handful of stars. The white clock would have been perfectly readable without any help. The band was there anyway.

I run a wallpaper app as a solo developer, and one screen overlays a clock and a title on top of the image. To protect readability I had been laying down a uniform rgba(0,0,0,0.35) gradient across the top. A conservative choice.

Conservative and correct are not the same thing. The night sky was being dimmed for nothing. Meanwhile, on pale pastel images, 0.35 was not enough — the white text smeared into the background. A single fixed value was wrong in both directions.

So decide per image. The hard part turned out to be the question underneath: what exactly determines whether text is readable? I built a 240-image corpus and worked through four candidate metrics in order. The short version is that the method I ended up with removed the scrim entirely for 189 of the 240 images.

Moving the decision from the device to the pipeline

The first choice was where the computation should run.

Analyzing pixels on device came off the table quickly. There are thousands of wallpapers, and they scroll past continuously. Reading pixels on every display spends the rendering budget exactly where I least want to spend it. Worse, the same image can produce different answers on different devices.

What I settled on: compute once at ingest, write the result into the catalog as plain numbers. The app never touches image data. It reads a style and a scrim value from JSON and applies them.

Where the decision runsCost at display timeConsistencyCost to redo
On device, every displayPaid every timeVaries by device and OSNone
On device, cached after first runFirst display onlyVaries when cache is evictedNone
At ingest (what I chose)ZeroFully pinnedRecompute and redeploy

Only the last column gets worse. Change the logic and every asset needs reprocessing, plus a catalog redeploy. As long as a few thousand images can be processed quickly, that cost stays manageable. I measured the actual throughput further down.

Mean brightness fails on color

The first version was the most obvious thing I could write. Crop the top 12% band where the UI sits, take the plain RGB average, and use white text if it comes out below 0.5.

I ran that across 240 images and compared it against the 95th percentile of relative luminance computed at full resolution. They agreed on 120 images.

120 out of 240. That is a coin flip.

The breakdown made the cause obvious. Forty green foliage images, forty sunsets, forty mid-tone textures. All three are regions where (R+G+B)/3 does not track how the eye responds.

WCAG relative luminance linearizes the sRGB values first, then weights green at 0.7152, red at 0.2126, and blue at 0.0722. Green contributes almost ten times what blue does. A plain average flattens that away.

import numpy as np
 
def relative_luminance(rgb: np.ndarray) -> np.ndarray:
    """sRGB (uint8 or float) to WCAG 2.x relative luminance.
    Linearize first, then weight. Never use a plain channel average."""
    c = rgb.astype(np.float64) / 255.0
    lin = np.where(c <= 0.04045, c / 12.92, ((c + 0.055) / 1.055) ** 2.4)
    return 0.2126 * lin[..., 0] + 0.7152 * lin[..., 1] + 0.0722 * lin[..., 2]

Swapping in this function and rerunning the same decision on mean relative luminance moved agreement to 200 images. All eighty sunset and mid-tone errors disappeared.

Forty foliage images remained. Those were not a color problem.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Measured disagreement counts across 240 images for three families of metrics: mean brightness, percentiles, and windowed means
What judging on a downscaled thumbnail actually computes, measured against the full-resolution alternatives
How many images a uniform scrim was darkening for no reason, and the reduction after switching to per-image text color
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

App Dev2026-07-14
Long-Press Context Menus for a Gallery Item in a Rork Expo App
Long-pressing a wallpaper card does nothing, yet iOS users expect a preview and a menu. From why Pressable alone falls short, to a native context menu with zeego, resolving the scroll-vs-long-press conflict, wiring up save and share, and a custom overlay fallback for Android — all with working code.
App Dev2026-07-07
Laying Out Variable-Height Images in Two Columns: A Masonry Wallpaper Gallery in a Rork Expo App
From why numColumns cannot pack variable-aspect images cleanly, to a dependency-free column-balancing algorithm, to keeping virtualization with FlashList masonry and a pragmatic no-dependency fallback, building a wallpaper gallery with real code.
App Dev2026-07-05
Building a One-Time Code Field in Expo — SMS Autofill and Segmented Display Together
A six-digit verification screen looks trivial, but once you account for SMS autofill, pasting, and deleting one digit at a time, it needs real care. Here is how to nail the iOS and Android autofill first, then build a segmented look on top of a single TextInput that does not break.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →