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

Color: Document mapping from codes (e.g. a400) to names (e.g. accent1) #1000

Closed
phlippieb opened this issue Dec 20, 2017 · 2 comments
Closed

Comments

@phlippieb
Copy link
Contributor

phlippieb commented Dec 20, 2017

Note: this is a duplicate of #987, which was closed without a satisfactory resolution.

It seems like material colors are usually named according to a code-based naming scheme (e.g. blue 500, orange a400). The material color library uses a different naming scheme (e.g. blue.base, orange.accent1). The alternative naming scheme is presumably chosen because blue.500 would be invalid syntax, and that's fine. But: how do these schemes map to one another?

As per @DanielDahan's suggestion on #987, I have checked out materialcolor.com. It does not resolve my issue, because it only has the proper Material color codes, not the special naming scheme used in the iOS library (e.g. lighten1, accent4, etc).

I would happily submit a PR to the iOS library that simply adds comments indicating the proper Material color code for each color, but I honestly don't know how the mapping works. If someone would be so kind as to explain it to me, I will submit a PR. I would just need the correct and complete version of this sort of table:

x.base => x500
x.lighten1 => x400
x.accent1 => xa100
etc

@phlippieb phlippieb changed the title Color: Mapping from codes (e.g. a400) to names (e.g. accent1) Color: Document mapping from codes (e.g. a400) to names (e.g. accent1) Dec 20, 2017
@daniel-jonathan daniel-jonathan self-assigned this Dec 20, 2017
@daniel-jonathan
Copy link
Member

Hey! Great point and thank you for submitting this. In Material 3, this will be addressed.

@phlippieb
Copy link
Contributor Author

#1047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants