Bug reportNov 17, 2026· 0:23· 15 views
@mui/system blend(): wrong output colors for hsl() and color() inputs
0:23 total
Comments · 0
Be the first to comment.
Bug reportby SceneRecap AI
medium@mui/system colorManipulator blend(). Look at how non-rgb inputs are decomposed before channel mixing. hsl() channel values and color(srgb) 0..1 channel values appear to be mixed as if they were 0..255 rgb channels, without first converting to rgb.
os: macOSdpr: 1locale: en-USbrowser: Chromium 151.0.7922.34package: @mui/system v6.4.5timezone: Europe/Berlinviewport: 1280x720issue_ref: mui/material-ui#49753
Repro steps
- 1.Open the @mui/system blend() reproduction page for mui/material-ui#49753 using @mui/system v6.4.5.
- 2.Control: call blend('#fff', 'rgb(255, 0, 0)', 0.5) and read the output.
- 3.Call blend('#fff', 'hsl(0, 100%, 50%)', 0.5) and read the output. This is the same pure red.
- 4.Call blend('#fff', 'color(srgb 1 0 0)', 0.5) and read the output. This is also the same pure red.
Expected
All three inputs describe pure red #ff0000. blend('#fff', input, 0.5) should return rgb(255, 128, 128) (#ff8080) for each of them.
Actual
The rgb() input returns rgb(255, 128, 128), which is correct. The hsl(0, 100%, 50%) input returns rgb(128, 178, 153), shown as a green swatch. The color(srgb 1 0 0) input returns rgb(128, 128, 128), shown as a gray swatch.
Evidence
visualControl row 1: input rgb(255, 0, 0) gives actual output rgb(255, 128, 128). This matches the expected #ff8080. Status shows CORRECT.
visualRow 2: input hsl(0, 100%, 50%) gives actual output rgb(128, 178, 153) with a green swatch. Expected is #ff8080 = rgb(255,128,128). Status shows WRONG COLOR.
visualRow 3: input color(srgb 1 0 0) gives actual output rgb(128, 128, 128) with a gray swatch. Expected is #ff8080 = rgb(255,128,128). Status shows WRONG COLOR.
visualPage title confirms the reproduction context: @mui/system blend(), wrong hsl output, mui/material-ui#49753.
visualThe table is unchanged at the end of the recording. The wrong outputs are stable and not transient.
Issue markdown (copy-paste ready)
## @mui/system blend(): hsl() and color(srgb) inputs return wrong colors
Related: mui/material-ui#49753
### Environment
- @mui/system v6.4.5
- Chromium 151.0.7922.34 on macOS
- Viewport 1280x720, dpr 1, locale en-US
### Steps to reproduce
1. Call `blend('#fff', 'rgb(255, 0, 0)', 0.5)`. This is the control case.
2. Call `blend('#fff', 'hsl(0, 100%, 50%)', 0.5)`.
3. Call `blend('#fff', 'color(srgb 1 0 0)', 0.5)`.
All three inputs are pure red `#ff0000`.
### Expected
Each call returns `rgb(255, 128, 128)` (`#ff8080`).
### Actual
| Input | Actual output | Status |
|---|---|---|
| `rgb(255, 0, 0)` | `rgb(255, 128, 128)` | Correct (control) |
| `hsl(0, 100%, 50%)` | `rgb(128, 178, 153)` (green) | Wrong |
| `color(srgb 1 0 0)` | `rgb(128, 128, 128)` (gray) | Wrong |
### Evidence
- 1.0s: The control row with the rgb() input shows `rgb(255, 128, 128)` and is marked CORRECT.
- 1.0s: The hsl() row shows `rgb(128, 178, 153)` and is marked WRONG COLOR.
- 1.0s: The color(srgb) row shows `rgb(128, 128, 128)` and is marked WRONG COLOR.
- 22.6s: The results do not change for the rest of the recording.
### Suggested area
`blend()` in the @mui/system color manipulator. Non-rgb inputs seem to be mixed on their raw channel values (hue/saturation/lightness, or 0..1 srgb values) instead of being converted to rgb first.
*Recorded with SceneRecap.*Your recordings could explain themselves too.
Free plan · silent recordings welcome · bug reports included.
Try SceneRecap free →