01Start with a task that must remain clear
The page lets a customer review items, delivery information, and payment status, then request a refund when permitted. Start by reviewing a failed refund request: order information should remain available, the reason should be readable, and the customer should understand how to continue.

If you only have a UI image, reconstruct a layered draft and inspect the layout relationships you still need to build. See the Dayline reconstruction and editing example.
Details and settings
A default screen alone would miss much of this work. If promotional emphasis and refund errors share a red treatment, making both brighter on a dark surface does not explain their different meanings.
02Name roles before choosing theme values
These colors are illustrative choices, not a brand specification. Use your existing design system's roles and themes when a project has them.

Details and settings
| Role | Purpose in this example | Light | Dark |
|---|---|---|---|
canvas | Page background | #F6F7F9 | #101820 |
surface | Order content panel | #FFFFFF | #182431 |
text/primary | Item name, amount, essential content | #18212F | #E9EEF5 |
text/secondary | Supporting information and timestamps | #526071 | #B7C4D4 |
text/error | Refund failure reason | #B42318 | #FFB4AB |
An order amount and an error can happen to share a color without sharing a semantic role. Revising error styling should not unexpectedly recolor an ordinary amount.
This table does not define the whole interface. Focus, selection, disabled actions, and button foregrounds and backgrounds still need appropriate roles and checks.
03Manage values with modes
Figma variables can hold different values in different modes. Bind the relevant properties to variables, then change the design's mode. This concerns the order page's appearance, which is separate from the theme of Figma's editor controls.

Details and settings
On a plan supporting variable modes, prepare light and dark modes for the color collection and apply the roles to the appropriate text or fills. Check the current official instructions and availability before following an older screenshot.
When a paragraph fails to change, inspect that layer's actual variable and context. Record intentional component overrides. A single mismatch is not a reason to replace every occurrence of the same color.
04Calculate the actual foreground-background pairs
WCAG 2.2 distinguishes ordinary text, large text, and exceptions. For this exercise, treat the content as ordinary body text and check against 4.5:1. These calculations assume opaque text directly on the uniform surface color.

Details and settings
| Text role | Light surface | Dark surface |
|---|---|---|
| Essential content | 16.19:1 | 13.49:1 |
| Supporting information | 6.42:1 | 8.88:1 |
| Error reason | 6.57:1 | 9.26:1 |
All six pairs exceed that threshold. This is not a complete accessibility assessment: images, gradients, or translucent overlays require checks against the resulting background. The table does not verify clipping, keyboard behavior, reading order, or the final rendered interface.
W3C: Text contrast requirements and exceptions
Supporting information still needs to be readable. Content required to review an order should not be treated as inactive text merely to make the palette look softer.
05Review the refund states
| State | What this example needs | What can be missed |
|---|---|---|
| Request available | A clear action and conditions | Button background changes without reviewing its label |
| Submitting | Understandable progress feedback | Disabled styling alone leaves the customer unsure whether the click worked |
| Request failed | A reason, retained input, and next action | Red styling without an explanation |
| Request unavailable | A readable reason | Dimming the entire area hides the conditions too |
| Confirmation dialog | The relevant order, consequence, and way back | Reviewing the underlying page but missing the dialog, overlay, and focus |

Details and settings
These are proposed review checks, not implemented behaviors. Provide understandable error text and a non-color indication of selection. Necessary visual cues for controls and states also need review under the applicable non-text contrast rules; not every decorative border has the same requirement.
06Scope an AI-assisted revision
For an existing order page, this original teaching prompt explores a separate dark-theme candidate. It has not been run in a model.

Details and settings
Create a separate dark-theme candidate for this order details page. Preserve all items, amounts, addresses, wording, action positions, and layout. Add no decoration. Define roles for the page background, content surface, primary text, supporting text, and error text, then propose dark values. Keep the refund failure reason and retry action. List the buttons, disabled states, dialog, and focus treatment that still need review. Do not describe a generated image as completed variable binding.
Review hierarchy and readability before applying the candidate. A dark image does not establish variables, components, or runtime theme behavior. Those require separate implementation and verification.
Handoff materials should identify role names, theme values, states, and exceptions. Following the system appearance, offering a user choice, and remembering that choice are product implementation decisions that a color table does not settle.
Sources and example notes
We read Pixso's theme-switching tutorial for its role-based organization and state checks. The order scenario, colors, calculations, and scoped revision prompt here are our own. Its screens and assets are not reused.
Pixso: Theme switching with variables
This tutorial includes original concept art, fixed-view HTML state demonstrations, and six opaque-color contrast calculations. We have not built these states in Figma, tested production theme switching or devices, or run the prompt. The loops are not Figma recordings.
