Skip to content

Add YAML exclude list for color token export - #268

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

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

Conversation

@phiilu

@phiilu phiilu commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

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.

@subdan

subdan commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

You can exclude colors from exporting on iOS by setting description field to "android"

Screenshot 2026-07-16 at 20 26 32

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.

2 participants