Mark transparency-required color tokens in the theme token JSON
What's the scenario?
Some theme colors are applied to foreground overlays rather than ordinary surfaces. In the gallery view, for example, color.surface.hover colors an absolutely positioned layer shown over the page card on hover. If a theme sets this token to an opaque color, the layer hides the card content.
The default value includes transparency (oklch(61.78% 0 0 / 0.05)), but this requirement is not clearly indicated in the token JSON. As a result, customized themes may assign an opaque color (generated manually or via AI).
What's the goal?
Identify in the theme token JSON every color token that must include transparency because it is used on an overlay above other content.
For each affected token, explicitly indicate that its value must be translucent, and show the expected alpha format or a suitable default opacity. Theme authors and AI assistants should be able to generate valid themes without having to infer this requirement from the application’s implementation.
At minimum, document color.surface.hover as transparency-required.
0 Comments
Sign in to comment
No comments yet. Be the first to share your thoughts.
