Comments (4)
Hello,
I followed the steps listed to reproduce the issue with the Switch component using MUI v.5.15.13 and v.5.15.15.
Environment:
Chrome browser
MUI version tested: 5.15.13 and 5.15.15
Steps Reproduced:
Updated to MUI v.5.15.13 and v.5.15.15.
Implemented ThemeProvider using the specified RGB format for the primary color in the palette.
Added the Switch component with color="primary" and checked={true}.
Outcome:
Received the error as reported: "MUI: Unsupported 58, 53, 65 color. The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()."
This confirms that the issue persists as its described. It seems that MUI does not currently support plain RGB values without the rgb() function. It might be helpful to specify in the documentation that colors need to be provided in the rgb() or other supported formats.
from material-ui.
The error is self-descriptive, what you are providing is not a valid color. Which version did this work with? I tried an older version (before v.15.13), and it still yields the same error: https://stackblitz.com/edit/react-ceuj3r-hci311?file=package.json
from material-ui.
Also got this after an update to 5.15.15 from 5.14.10 without changes in our application's code
EDIT: It was due to an error on our side, of extending the theme's palette
with a new color and not giving it a valid color as its value.
from material-ui.
Looking at my upgrade path, I was actually on 5.15.12 not 5.15.13 so it's possible it wasn't this commit.
I'm going to update my code to include a call to rgb() to make things work on my project. If that's the desired path forward, that'll work fine. But the behavior has certainly changed from previously -- that's all I was trying to point out.
If you don't want to support the old behavior, feel free to close this.
from material-ui.
Related Issues (20)
- [docs] Improving the sx prop documentation HOT 1
- Sticky header groups overlap each other HOT 3
- [docs] react in jsx scope HOT 2
- [material-ui][Autocomplete] Selected Option is hidden when it is Focused HOT 5
- Background color not visible in print HOT 1
- [material-ui][TextField] TextField multiline resize is unstable. HOT 2
- [material][Tabs] Disable scroll animation via prop
- Module not found: Error: Can't resolve '@mui/material' HOT 3
- [docs][material-ui] Improve documentation regarding slot pattern
- [material-ui] Avoid `ownerState` silent propagation
- [joy-ui][Modal] Is it expected for actions to be presented inverted? HOT 5
- [icons] Gavel Icon Outlined not outlined HOT 1
- Screen reader doesn't announce Dialog description but it announces Modal description
- Mistmatch error when using styled function with mui components
- [docs] Unexpected horizontal scroll in table view of some API docs HOT 4
- The skeleton component is not visible with a dark background. HOT 3
- data-mui-color-scheme not changing when toggling mode in NextJS 14 (App Router) HOT 1
- Add AccordionSummary ContractIcon HOT 2
- DateRangePicker support selecting months and years
- [docs-infra] Support {{"component" markdown collocation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-ui.