Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Design Tokens for Color Values #951

Open
iamralpht opened this issue Apr 2, 2024 · 1 comment
Open

Support Design Tokens for Color Values #951

iamralpht opened this issue Apr 2, 2024 · 1 comment
Assignees
Labels
design tokens Design Tokens ala Material enhancement New feature or request ❗ P1 Priority for next release needs design
Milestone

Comments

@iamralpht
Copy link
Collaborator

We'd like to support Design Tokens, starting with tokens for colors. The goal is for a DesignCompose app to be able to override the colors of different design elements at runtime, based on token values that are computed at runtime.

There are a few elements to this, which should be covered in a design doc ahead of implementation:

  • How are design tokens specified in Figma? We've previously looked at Figma Variables and at the Material Design Token Plugin (which uses Figma Styles, but is a bit hard to work with because you can only see one set of token values in a doc at a time). We need to decide on a supported approach or approaches.
  • How are design token values communicated in Kotlin? Most likely, we will have some low level interface that proves a Map<String, Color> to go from the token name to color value, and then a layer on top that can go from AAOS OEM Design Token definitions into that map.
  • How does the DC renderer look up token values from the map when it renders?
  • (Do we want to only allow Color, or just say Brush, and be more generic to what can be used?).
@iamralpht iamralpht added enhancement New feature or request needs design design tokens Design Tokens ala Material labels Apr 2, 2024
@iamralpht iamralpht added this to the 0.27 milestone Apr 2, 2024
@iamralpht iamralpht added the ❗ P1 Priority for next release label Apr 2, 2024
@iamralpht
Copy link
Collaborator Author

Scheduled for 0.27 (May 13th RC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design tokens Design Tokens ala Material enhancement New feature or request ❗ P1 Priority for next release needs design
Projects
Status: Needs Triage
Development

No branches or pull requests

3 participants