-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[charts] Improve default color contrast in dark mode #13880
Comments
@alexfauquette we can change the colors on the docs though, without changing the default values on the Lib |
It would implies to have in each demo a prop I'm not a big fan. Even if the colors are not perfect the demos should represent what the user will get |
Ah, nvm then, I thought we had a way to override the entire theme 😅 |
We could support defaultProps on the container, and then update it. But how many users will spend their time wondering why their charts are not like the ones in the documentation 🙈 If I copy the code of a demo and want to see the same result. Not having to figure out they internally have a custom theme that modifies colors |
I feel like the issue is with the palette itself, I struggle with the contrast of https://mui.com/x/react-charts/zoom-and-pan/#zooming-options in dark mode too. To illustrate it, I feel like there are opportunities to make the make color feel more contrasting and still balances when shown next to each other. For example, on my Apple XHR screen. This makes the first 3 colors feel more balanced when on a pie charts, light and dark mode. diff --git a/packages/x-charts/src/colorPalettes/colorPalettes.ts b/packages/x-charts/src/colorPalettes/colorPalettes.ts
index e22801d29..da65aacad 100644
--- a/packages/x-charts/src/colorPalettes/colorPalettes.ts
+++ b/packages/x-charts/src/colorPalettes/colorPalettes.ts
@@ -4,13 +4,13 @@ export type ChartsColorPalette = string[] | ChartsColorPaletteCallback;
export const blueberryTwilightPaletteLight = [
'#02B2AF',
- '#2E96FF',
- '#B800D8',
+ '#148AFF',
+ '#BF00E0',
'#60009B',
'#2731C8',
'#03008D',
];
export const blueberryTwilightPaletteDark = [
- '#02B2AF',
+ '#5BD399',
'#72CCFF',
'#DA00FF',
'#9001CB', https://mui.com/x/react-charts/styling/#color-palette I suspect we should leave it like this for now, and have a designer tweak all the values at once. |
If we don't have a way to do it, it would be nice to add one, overriding the colors on all the charts in my app seems to be something I would like 👍 |
There could be some value in having design bandwidth focused on this, e.g. #9980 Benchmark
I suspect that the ideal would be to have in the long run:
|
We already have 3 palettes thanks to @noraleonte :) I think "blueberry" is made for material, and "cheerfull-fiesta" is for joy 😉 |
@alexfauquette Would it make sense to take another look at the color palettes now that we have more types of charts than we had when we first created them? |
Originally posted by @oliviertassinari in #13859 (comment)
I agree on this point, but to change default colors we should wait for v8
Search keywords:
The text was updated successfully, but these errors were encountered: