The scenario: a valid brand colour can still need a readable presentation
A clinic colour can work in a logo yet become difficult to read as small text against an app surface. A patient can also choose a custom accent or request a wallpaper-derived scheme. Theme selection therefore needs to distinguish the source colour, the effective role values and the surfaces on which text actually appears.
Seven Android theme-selection cases and two contrast cases passed for selected Movo-X functions. The inputs are constructed schemes and supplied colours, not screenshots or actual wallpaper extraction. The results support selected numeric and selection contracts. They do not establish that every rendered screen, icon, state or custom component is accessible.
Resolve the light or dark mode before selecting the colour source
The selected mode case checks that system mode follows the supplied system flag, while explicit light and dark choices override it. The inspected theme uses that resolved mode when selecting clinic, custom or dynamic colours. This separates a display preference from the colour source itself.
These tests invoke the mode function with Booleans. They do not toggle a real system preference, recreate an activity or inspect status bars and dialogs. Source wiring identifies where the effective mode is consumed, but native lifecycle and visual acceptance must verify the installed experience. A correct pure selector does not prove every screen uses it.
Retain the selected seed while allowing role colours to change
The clinic-source fixture checks a supplied clinic seed and a default brand when no clinic is supplied. The custom-source fixture checks a supplied accent and fallback to the clinic colour when that accent is absent. The returned choice keeps a seed alongside its effective colour scheme.
That distinction matters when a text role is adjusted for contrast while a separate visual treatment still uses the original seed. Do not assume that returning a seed means every role has that exact colour. Inspect actual component usage and any independently generated gradients, chips or illustrations before claiming consistent readability throughout the interface.
Accept or replace a supplied dynamic scheme using explicit role pairs
One fixture supplies a constructed light scheme that passes the selected role check and verifies that the same scheme object is retained. Another supplies a constructed dark scheme with a failing primary role, checks fallback and verifies that the selected fallback passes that helper. A missing dynamic scheme uses the supplied clinic seed in its selected case.
The inspected helper evaluates nine named foreground/background pairs. It is not a traversal of the composed UI tree or every Material colour token. The function name includes AA, but its Boolean result means those selected numeric pairs passed. It must not be presented as certification of an entire screen or application.
Adjust foreground roles against their intended surfaces
The inspected brand-scheme builder starts from a light or dark base, adjusts its primary text colour toward black or white as needed and selects a contrasting content colour. It also constructs selected containers and associated content roles. The source performs discrete adjustment steps rather than proving that a colour is the nearest possible perceptual match.
The selected contrast cases evaluate primary/background, onBackground/background and onPrimary/primary across supplied brands in both modes. Another checks that one already-readable brand remains unchanged in a light scheme. These are concrete selected role outcomes; they are not a proof over every possible colour, opacity, background image or component state.
Keep loop coverage and test-case counts honest
The theme-selection fixture loops across selected brands, both modes and all selected colour-source enum values. For those combinations it checks three named contrast pairs. The separate brand-scheme case also loops through selected brands and modes. Repeated assertions inside one method are useful coverage, but they are not separately counted tests in this series.
This chapter is backed by nine existing JVM cases. The loops do not establish universal colour-space coverage or every dynamic scheme. Additional alpha composition, selected container roles, disabled states, focus indications and gradients require their own acceptance. Count and describe exactly what was measured rather than multiplying the headline count by every loop combination.
Use the text-contrast threshold as context rather than a blanket badge
W3C explains a minimum ratio of 4.5:1 for ordinary text under SC 1.4.3, with different treatment for large text and selected exceptions. It also distinguishes text contrast from non-text requirements. The Movo-X helper uses a 4.5 threshold for its selected role pairs.
That provides context for the numeric policy, not a whole-app conformance result. The actual text roles, surfaces, font presentation and interaction states still need review. A computed role pair does not establish touch target size, focus order, semantic labels, screen-reader announcements or whether meaning is conveyed by colour alone.
Keep colour arithmetic separate from actual native rendering
The inspected composition path can request a platform dynamic scheme and consume appearance preferences at the activity theme root. That code was read, but this batch did not execute Android wallpaper APIs, render Compose previews or drive a real settings screen. The selected arithmetic assumes the colour representation supplied to it.
Native acceptance should inspect actual resolved backgrounds, overlays and text roles with representative custom, clinic and dynamic choices. Test enlarged text, dark-mode transitions and unusual content as well as attractive defaults. Compare the installed components with the named roles before extending the selected numeric result to a visible product claim.
A theme-engineering handover
Retain the nine scoped cases with the supplied schemes, seed decisions and exact checked pairs. Add controlled role cases where coverage is absent, then perform rendered screen and assistive-technology acceptance on representative devices. Verify activity transitions and components that bypass the shared theme.
For a CTO, the deliverable is a theme policy with inspectable inputs and bounded claims: the mode is resolved, a source seed is chosen, selected role values are adjusted or a dynamic scheme is replaced, and actual screens receive independent review. The selected evidence supports that policy without claiming that arithmetic alone makes the complete application accessible.
Compare the reviewed boundaries
Source selection, role contrast and accessibility have different evidence
On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.
| Boundary | Selected evidence | Separate acceptance |
|---|---|---|
| Mode and seed | Constructed flags and supplied clinic/custom inputs | Actual settings and activity transitions |
| Dynamic scheme | Supplied passing/failing scheme decisions | Wallpaper API and real platform values |
| Contrast roles | Selected numerical pairs and brand/mode loops | Every actual text surface, state and alpha composition |
| Whole interface | Source wiring only in this batch | Rendered layout, semantics and assistive technology |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
dark = resolve_theme_mode(user_mode, supplied_system_mode)
choice = select_source_scheme(clinic, custom_accent, supplied_dynamic_scheme)
if dynamic_scheme_fails_selected_role_pairs: use_defined_brand_fallback()
measure_the_named_foreground_background_pairs(choice.scheme)
# Selected numeric checks do not certify all rendered states or whole-app accessibility.Additional implementation references
These provider references explain current implementation context. Historical Movo-X observations remain tied to the source records described above.
About this engineering series
Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.
Explore the Movo-X engineering series → · Related implementation experience →
Discuss a similar engineering problem
Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.
Discuss your project on WhatsApp ↗