A Power App three-button sync color change when pressed is a state-management pattern, not a built-in control. Each button carries a Boolean variable in its OnSelect property, and every button's Fill reads that shared variable through a conditional formula. Pressing Button A sets its variable to true and resets the other two to false, so all three controls repaint from one source of truth.

This answer covers why that works at the formula-engine level, where it breaks, and what to change before you ship it.

The recalc loop behind a synced button color

Power Apps runs a spreadsheet-style dependency graph. Every control property is a formula node. When a variable changes, the engine marks dependent nodes dirty and recomputes them in dependency order, not document order. That ordering is why a single Set call can repaint three buttons in one frame instead of three.

The Fill property of each button is a pure function of state. A typical formula is If(varActive = "A", ColorValue("#1F6FEB"), ColorValue("#E5E7EB")). The text color usually flips too, because the same variable drives both properties. Nothing about this is special to color; Fill is just the most visible output.

OnSelect is where the write happens. Button A runs Set(varActive, "A"). That single write invalidates every Fill that references varActive. The renderer batches those invalidations and repaints once. The three buttons never talk to each other directly, which is the point: the variable is the channel, and the buttons are subscribers.

The naive alternative, self-referencing color logic like If(Self.Pressed, ...), does not survive a screen change. Pressed is volatile and resets when the control re-renders. A variable survives navigation because it lives in the app scope, not the control scope. That distinction explains most "it worked yesterday" bug reports.

Quantified context: frame budgets and variable counts

A default Power Apps canvas app targets a 60 Hz render loop, so one frame is roughly 16.7 milliseconds. A single Set that dirties three Fill nodes typically resolves well inside that budget on a mid-range device. The cost scales with subscriber count, not button count: 20 controls reading one variable is still one invalidation pass, but 20 variables each read by one control is 20 independent passes.

Variable count is the real ceiling. Each global variable adds a live dependency node to the app scope, and each node persists for the session. Community guidance converges on keeping global variables in the low dozens and pushing collections or component-scoped state for anything larger. There is no published hard limit from Microsoft, so treat any specific number as a heuristic, not a specification.

Memory matters more than speed on mobile. A canvas app player session holds the authoring document, the dependency graph, and active variable values. Three Boolean variables are negligible; three hundred collected records with delegations are not. The color-sync pattern itself is cheap. What surrounds it usually is not.

Timeline of a single button press

Step What happens Typical duration
Touch down Control captures pointer, Pressed flips true locally Under 1 frame
OnSelect fires Your formula runs, Set writes the variable 1 to 3 ms
Dependency mark Engine flags every Fill referencing the variable Sub-millisecond per node
Recompute Fill formulas evaluated in dependency order 1 to 5 ms for 3 buttons
Repaint Renderer composites the new fills Within next frame
Idle Variable holds until next Set or app close Session lifetime

The whole sequence usually completes inside two frames, which is why the color change feels instant. The table also shows the failure window: anything that blocks OnSelect, such as a slow connector call placed before the Set, delays the repaint by the call's duration.

Edge cases that break the sync

Screen navigation clears control state but preserves variables, so the pattern survives back-and-forth movement. Component instances are the trap. A variable set inside a component is scoped to that instance unless you pass it out through an output property or a global write. Two instances of the same component will not share color unless the state lives above them.

Concurrent taps are the second trap. If a user presses two buttons within the same frame, both OnSelect handlers can queue, and the last Set wins. The visual result is deterministic but may not match the user's intent. For destructive actions, gate the OnSelect with a guard variable and a short debounce.

Delegation is the third. If Fill reads from a filtered data source instead of a variable, the engine may issue a network query per repaint. Keep color state in local variables, not in SharePoint or Dataverse lookups, unless the color genuinely depends on server data.

Red flag: color driven by a formula that reads a data source without delegation, which queries on every repaint. Red flag: state stored in a component variable and expected to sync across instances. Red flag: OnSelect that calls a connector before the Set, delaying the repaint. Red flag: Fill formulas that reference Self, which reset on navigation. Red flag: three separate Boolean variables toggled in sequence instead of one string or enum, which allows inconsistent intermediate states.

Misconceptions about pressed-state color

The most common misconception is that a button has a built-in "selected" appearance. Canvas app buttons expose HoverFill and PressedFill, but those are transient interaction states, not persistent selection. They revert on release. Persistent color requires your own state variable.

A second misconception is that Fill and PressedFill fight each other. In practice, PressedFill overrides Fill only during the pointer-down event, so a selected button correctly shows its selected color again on release. The two properties can coexist without cleanup code.

The counterintuitive professional caveat: syncing color across three buttons with one variable is usually the wrong abstraction once you reach five or more. At that point a segmented control or a gallery with a selected-item variable gives you keyboard navigation, accessibility semantics, and a single rendering path. Three buttons is the threshold where hand-rolled state is cheaper than configuration.

A third misconception concerns accessibility. Color alone does not communicate selection to screen readers. Pair the fill change with a text label, an icon, or a Notify call so the state change is perceivable without vision. This is a WCAG-aligned practice, not a Power Apps-specific rule.

Choosing between sync approaches

Approach State location Survives navigation Shared across components Best for
Separate Booleans App variables Yes Yes, if global Two buttons, quick builds
Single string or enum App variable Yes Yes, if global Three to five mutually exclusive buttons
Component output property Component instance Instance-scoped Only with explicit wiring Reusable button groups
Collection with selected flag App collection Yes Yes Dynamic lists, galleries
Segmented control Built-in control Yes Yes, if global Formal single-select UI
Radio control Built-in control Yes Yes, if global Accessible option sets

The single-string pattern wins for the three-button case. Set(varActive, "A") in Button A, Set(varActive, "B") in Button B, and so on. Fill becomes If(varActive = "A", selectedColor, idleColor). One variable, one write path, one failure mode.

The separate-Boolean pattern looks simpler but creates three write operations per press and permits impossible states, such as two buttons showing selected at once. That inconsistency is hard to reproduce and harder to debug.

The built-in segmented and radio controls solve the same problem with less code and better assistive-technology support. Reach for them first if your design allows it.

Practical steps to build and harden the pattern

Name the variable by intent, not by control. varReportMode beats varButton1State because it survives redesigns and reads correctly in Fill formulas six months later.

Write all three OnSelect properties to the same variable using one helper formula. For example, Button B runs Set(varActive, "B"). Do not toggle; assign. Assignment is idempotent, so a double tap cannot produce an invalid state.

Centralize the color mapping. Define selectedColor and idleColor as named formulas or a small table, then reference them in every Fill. Changing the palette then means one edit, not six.

Test the navigation round trip. Press Button A, navigate away, return, and confirm the color persists. If it does not, your state is in the wrong scope.

Test component reuse. Drop two instances of the button component on one screen and confirm they do not leak state. If they do, lift the variable to the app scope.

Measure, do not assume. Use the app checker and monitor to confirm no unexpected connector calls fire on repaint. A clean pattern issues zero network requests for three local variable reads.

Practical threshold: switch from separate Booleans to one string variable at the third button. Practical threshold: switch to a segmented or radio control at five mutually exclusive options. Practical threshold: lift state to app scope the moment two screens must agree on the color.

Limitations and what the pattern cannot guarantee

Power Apps gives no atomic multi-variable transaction. Two Set calls in one OnSelect are two writes, and an error between them leaves a mixed state. Single-variable patterns avoid this entirely, which is another argument for the string approach.

There is no official service-level guarantee on repaint latency, no published dependency-graph depth limit, and no supported way to inspect the graph directly. Benchmarks you see in forums are device-specific and should be treated as anecdotes.

Screen reader announcements of color changes are not automatic. You must add the text or icon reinforcement yourself. Color is also insufficient for color-blind users when the selected and idle colors differ in hue but not luminance; choose values that differ in lightness as well.

Offline behavior adds another limit. Variables persist in the local session, but if your Fill formula reaches a cached data source, the repaint can stall while the cache refreshes. Keep the color decision purely local.

Finally, this pattern scales to a handful of controls, not a design system. Once you need undo, history, or cross-screen synchronization with server state, move the selection into a collection or a Dataverse column and treat the variable as a cache. The three-button sync is a starting point, not an architecture.