The workflow

  1. 01What belongs in the token file?
  2. 02How do I generate the catalog?
  3. 03What should I inspect in Contents.json?
  4. 04Did Xcode accept the generated files?

Define each semantic color with explicit light, dark, high-contrast-light, and high-contrast-dark values, then generate a named color set from that JSON. In this walkthrough, the published CLI created a real asset catalog and Xcode's asset compiler successfully produced an Assets.car file.

What belongs in the token file?

A token name should express a role that the application can reuse. AccentColor, Background, and TextPrimary describe intent more clearly than names tied to a particular screen coordinate. This example uses only the required accent to keep the generated output small enough to inspect completely.

The generator accepts a versioned JSON format, not arbitrary design prose. Every color needs all four appearance values. That requirement avoids silently guessing a dark equivalent from a light color. It also makes omissions visible during generation instead of leaving the coding agent to fill them differently in several Swift files.

Here is the exact token input used for the run:

{
  "version": 1,
  "colors": {
    "AccentColor": {
      "light": "#2457DB",
      "dark": "#90B4FF",
      "highContrastLight": "#12358F",
      "highContrastDark": "#C7DAFF"
    }
  }
}

The repository documents sRGB hexadecimal values, including an optional alpha component. It also requires ASCII identifier names that are unique without regard to case. These are constraints of this generator's input contract, not a claim that every asset pipeline must use the same token format.

How do I generate the catalog?

With the published package, the command is:

npx -y ios-agent-mcp@2.7.0 assets \
  --tokens tokens.json \
  --output App/Assets.xcassets

The parent App directory must already exist. The destination catalog must not exist, because this command refuses to overwrite an existing catalog. Generate a sibling directory when evaluating a token change, inspect the differences, and merge the intended output into the project through its normal review process.

For the actual run I used an isolated installation of that exact npm version and called its entry point directly. This avoids an ambiguous latest dependency while recording evidence. The command reported two created catalog files: the catalog metadata and AccentColor.colorset/Contents.json.

The resulting directory structure is small:

Assets.xcassets/
  Contents.json
  AccentColor.colorset/
    Contents.json

Apple's named-color format reference documents color-set metadata and color components. The generated Contents.json is available with this draft, rather than represented only by an illustration.

What should I inspect in Contents.json?

Check that the color set has four entries and that each entry corresponds to the intended appearance. The default entry supplies the ordinary light value. The remaining entries distinguish dark appearance, increased contrast, and their combination. Compare the normalized channel values with the input rather than assuming a successfully written file has the intended color.

Also check the semantic name. A Swift reference to a differently spelled asset will not become correct merely because the catalog itself compiles. Keep the code and token vocabulary aligned. This generator does not audit all Color calls or prove that the application actually uses the newly generated color.

For broader palettes, review foreground/background pairs together. Four present variants are a structural property. Readable contrast is a separate visual and numerical property that depends on the actual background, transparency, and surrounding interface.

Did Xcode accept the generated files?

Yes. I compiled the generated catalog with the installed simulator SDK:

mkdir -p compiled-assets
xcrun actool Assets.xcassets \
  --compile compiled-assets \
  --platform iphonesimulator \
  --minimum-deployment-target 17.0 \
  --target-device iphone \
  --output-format human-readable-text

The command returned exit code 0 and reported compiled-assets/Assets.car. The recorded compiler output is included. This verifies that the asset compiler accepted the catalog under the recorded toolchain; it is stronger evidence than JSON parsing alone.

It is still not a screenshot test. The run did not launch an app, switch interface appearance, or inspect Dynamic Type. To establish the final user experience, integrate the catalog into the target, build, and inspect the relevant screens in all supported appearance states.

Do I need Figma or a paid design tool?

No. The input is ordinary JSON and can be authored in a text editor. If a designer already uses Figma, map resolved variables to the four explicit fields. Do not add a second tool solely to supply a small token file.

Icons are a separate concern. The repository can rasterize ordered SVG layers into a PNG, but a flattened PNG is not a native Icon Composer document. This color-only test generated no icon and makes no claim about Liquid Glass, required icon sizes, or App Store submission. Keep those deliverables and their verification records separate.

Limits

Successful generation does not certify accessibility, color contrast, semantic naming quality, or review acceptance. Existing catalogs are deliberately not overwritten. This run used one color and one simulator target; it did not exercise every possible alpha value, device family, or project integration. The cover image is conceptual artwork, not a rendering of these exact four swatches in an app.

Last verified

September 16, 2026. Published MCP package 2.7.0 with CLI 0.3.0; Node.js 24.15.0; Xcode 26.6 build 17F113. Asset generation and actool compilation passed. Repository source: docs/design/asset-generation.md.

Example project: ios-agent-skill.