Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

419
Views
How to make the default color theme in MUI transparent?

I wanted to set the background color of an element to be the primary main color but with transparency using Material-UI, tried to do it the following ways but both hasn't worked , any suggestion i would highly appreciate it.

backgroundColor: `rgba(${theme.palette.primary.main}, 0.6)`,

&

background: `rgba(${theme.palette.primary.main}, 0.6)`,
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

A solution which I have used for this before is to handle the transparent color in the theme.

so for example in one of my projects I define the theme.palette.primary.main color at the top of my theme and then I calculate a lighter variant using the rgba function as you have done in your example as well. I then define this color in my theme so I can reuse it in multiple places by calling theme.palette.primary.light (or whatever you wish to call it).

and then

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!