0

We are currently using a customized version of MUI. I noticed that with some elements such as the buttons, transparency is being used for disabled states instead of assigning solid colors.

Is there a reason for this?

I remember an old co-worker who was partially visually impaired saying that using transparent colors goes against accessibility, but how I understand it, MUI does this to accommodate accessibility - ie, make sure the disabled buttons are still readable in dark mode.

Can someone please enlighten me?

1 Answer 1

0

The transparency is used so the background color is darkened by the darkness of the inactive element. Meaning a grey of 38% will darken the background color by that much.

However, you can always use contrast checker tools to see if the user interface is actually accessible.

New contributor
SDCA is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.