[colorManipulator] Theme colors in the new syntax without comma (rgb(106 27 154)
) fail to generate correct contrast color for buttons
#43382
Labels
customization: css
Design CSS customizability
enhancement
This is not a bug, nor a new feature
package: system
Specific to @mui/system
Steps to reproduce
Link to live example: codesandbox
Steps:
rgb
color function, for examplergb(106 27 154)
<Button variant="contained">click me</Button>
rgb(106, 27, 154)
Current behavior
A dark rgb theme color in the new color syntax results in the wrong contrast text being applied:
I reckon this might affect other areas as well, but I have only identified this behavior for the
Button
componentExpected behavior
I expect a button with a dark theme color background to have white contrast text:
Context
No response
Your environment
Chrome Version 127.0.6533.120 (Official Build) (arm64)
npx @mui/envinfo
Search keywords: contrast, comma, rgb
The text was updated successfully, but these errors were encountered: