A token transform can be deterministic even when color choices need human judgment. Supply explicit light, dark and high-contrast values and inspect the generated catalog before merging it.

Explicit tokens → Validate names → Generate catalog → Compile and inspect
  1. 1Explicit tokens
  2. 2Validate names
  3. 3Generate catalog
  4. 4Compile and inspect

Work through the example

Use a new output directory because generation refuses to overwrite an existing catalog. Compare all four appearances.

Start with a disposable branch and synthetic data. Write the expected outcome before changing the implementation, then keep the first failing result. This prevents a later repair from quietly redefining the task. The procedure below is grounded in the repository reference; its examples must still be checked against your project and installed toolchain.

Implementation reference

The following focused section is adapted from the maintained project guide. It preserves the source’s examples and limitations.

Evidence and limits

The CLI tests verify schema rejection, appearance slots, alpha conversion, non-overwrite behavior, ordered raster pixels, RGB output and 1024×1024 dimensions. On macOS, generated colors and the iOS app-icon set were compiled using xcrun actool against the installed simulator SDK. This does not verify a native .icon, a full screenshot capture pipeline, symbol availability or visual accessibility.

Catalog format: Apple named colors and appearance variants.

Acceptance and failure review

Checkpoint What to inspect If it does not match
Explicit tokens Confirm the input and environment Preserve the failure and return to this step
Validate names Inspect the intermediate artifact Preserve the failure and return to this step
Generate catalog Run the focused check Preserve the failure and return to this step
Compile and inspect Record the observed result Preserve the failure and return to this step

Ask the agent to explain the smallest change that resolves the observed mismatch. Keep unrelated refactors out of the repair. A change that makes a warning disappear is not enough if the behavior or ownership contract has changed. Re-run the same acceptance check so the before and after results are comparable.

Evidence and limits

The existing asset walkthrough includes actool evidence; it does not establish contrast in every screen.

This is an educational guide. Its presence in the series does not certify a completed client-specific lab. The series evidence record separates executed checks from exercises and blocked environments.

Inspect the source used in this lesson.

What to do next

Next: Typography in SwiftUI that respects Dynamic Type: rules an agent can follow