automotive-design-compose
automotive-design-compose copied to clipboard
Support Design Tokens for Color Values
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 sayBrush, and be more generic to what can be used?).
Scheduled for 0.27 (May 13th RC)