Skip to content

Conversation

@kyledurand
Copy link
Member

@kyledurand kyledurand commented May 26, 2023

This adds the ability to generate gray tokens with alpha values for the new transparency subset

@kyledurand kyledurand force-pushed the add-new-transparent-colors branch from 9743f53 to 92286f0 Compare May 26, 2023 14:05
@kyledurand kyledurand force-pushed the add-new-transparent-colors branch from 92286f0 to 29587f4 Compare May 26, 2023 17:15
@kyledurand kyledurand force-pushed the add-new-transparent-colors branch from e58ddd7 to f108f2d Compare May 26, 2023 17:23
Copy link
Member

@aaronccasanova aaronccasanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sufficient starting point for applying alpha values to the gray palette and unblocking beta overrides. I'm not sure the pattern is very scalable as we'd likely have to update each shade to a function that returns an rgba to establish a convention and consistency.

Two approaches I would like to see explored is a simple toRgba util that updates the alpha (e.g. toRgba(gray[2], 0.5)) or breaking up palette colors into two parts (e.g. a grayParts object with rgb values and a gray object using the parts and applying alpha).

Since accessing these tokens in JS or the build assets is always a key/value pair, I think we are fine to proceed with this strategy and update to the above or something else in the future.

Copy link
Contributor

@yurm04 yurm04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good as a first/quick solution. Agree with Aaron that this could be further optimized but let's ship this now and come back to it 💯 🚢

@kyledurand
Copy link
Member Author

Yeah, now that we have a transparency theme we need the system to be more flexible at scale, agreed. This means a system change at some point but for now this works within the current system

@kyledurand kyledurand merged commit 164c0e2 into v11.x.x May 26, 2023
@kyledurand kyledurand deleted the add-new-transparent-colors branch May 26, 2023 18:23
sam-b-rose pushed a commit that referenced this pull request May 26, 2023
This adds the ability to generate gray tokens with alpha values for the
new transparency subset
sophschneider pushed a commit that referenced this pull request Jun 1, 2023
This adds the ability to generate gray tokens with alpha values for the
new transparency subset
sophschneider pushed a commit that referenced this pull request Jun 1, 2023
This adds the ability to generate gray tokens with alpha values for the
new transparency subset
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.

4 participants