-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Alert] Improve dark theme coloring #19105
Conversation
@material-ui/lab: parsed: -0.20% 😍, gzip: -0.03% 😍 Details of bundle changes.Comparing: 4f9c2fc...594ec67
|
|
oops, yes, I meant the filled variant. |
@dimitropoulos Agree 👍. I have tried to reduce the luminance of the colors, with a max at 45% ( |
I've been using Polished.js for precisely this for a while now to good results. Not sure what its introduction would do to the bundle size, but maybe it'd be no problem at all and have the side effect of solving the problem. Tree shaking is well supported so perhaps, with all the individual functions being relatively quite minuscule amount of code it won't be a problem in the slightest. @ahtcx are you able to give it a try with polished just for, if nothing else, us to see how it goes? |
You can find a 9 months old pull request where we evaluate polished over our own color manipulators. It what a 3 KB gzipped increase (with tree shaking), not great. I don't think that we should use it: #15540. I think that we have also opened an issue on polished side to report the findings. Related issue: #13039 What about we accept the changes for the standard variant, and leave the filled variant untouched, for later? Would we already get most of the benefits? 🤔 |
@oliviertassinari maybe I can reimplement |
I think that it would be great to first agree on the best color transformation we can apply, and then on the implementation. |
So, I did some checking in the Material Design site, I could find https://material.io/design/color/dark-theme.html#ui-application. They mentioning using desaturated color, which I interpret as reducing luminosity on the hsl geometry. So, are we good on this end? Now, considering that it's a global concern. I wonder if we should approach the problem from a systemic approach (beyond or alert use case). #18776 |
This reverts commit e6aea69.
I can't figure out a simple solution. The dark/light adaptation of the palette seems to pull in too many dependencies. I would propose that we scope the changes to the standard and outlined variants, which seem to be about revesting lighten with darken, depending on the theme. Something we do frequently |
Thank you guys. We will likely need to keep iterating on the dark mode colors for v5 :) |
Add inverting the color utility function depending on the theme type, making the dark theme less agressive.
Closes #19104