Skip to content

Add YAML exclude list for color token export#268

Open
phiilu wants to merge 1 commit intoRedMadRobot:masterfrom
phiilu:feat/color-exclude-list
Open

Add YAML exclude list for color token export#268
phiilu wants to merge 1 commit intoRedMadRobot:masterfrom
phiilu:feat/color-exclude-list

Conversation

@phiilu
Copy link
Copy Markdown

@phiilu phiilu commented Mar 23, 2026

We have background color tokens defined on Figma, but those are only used for Android and Figma designs itself. iOS uses the OS native system background colors. Therefore we would need a way to exclude certain tokens in the config. The allow list is not a good solution for us, as we want to include new tokens automatically.

This PR adds optional exclude lists for color export in figma-export.yaml:

  • common.colors.exclude
  • common.variablesColors.exclude

It supports exact names and wildcard patterns.

Example:

common:
  variablesColors:
    tokensFileId: <tokens-file-id>
    tokensCollectionName: "Mobile Color Types"
    lightModeName: "Light Mode"
    darkModeName: "Dark Mode"
    exclude:
      - background
      - backgroundSecondary
      - backgroundTertiary
      - background/*

Also, docs/templates were updated and tests were added for decoding the new config fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant