mui / mui/material-ui

[SvgIcon] Custom color not supported

Open
#26,192 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: SvgIcon scope: icons
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

I can't use a custom palette color.

Expected Behavior 🤔

I can use a custom palette color

Steps to Reproduce 🕹

Steps:

  1. Open https://codesandbox.io/s/customcolor-material-demo-forked-xog2v?file=/demo.js
  2. See that the color is wrong

Context 🔦

Reported by @ahfarmer in https://github.com/mui-org/material-ui/issues/13875#issuecomment-832903570.

It's actually the same for the Icon component.

Your Environment 🌎

v5.0.0-alpha.32

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SvgIcon and Icon components and reproduce the incorrect custom palette color using the linked CodeSandbox demo. Trace how the palette color is resolved, then verify that both components render the requested custom color rather than the wrong color.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.