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

279
Views
I'm trying to create an alternative color palette, using MUI, where according to the api it changes the background of my card

I'm trying to make these colors alternate according to the pokemon's type.

But I do not know how... Any idea!? here is where i am trying to create the logic

[here is where the palette should be played

inside the ```<Box sx={{ bgcolor: 'typecolor.main' }}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The MUI palette is extendable, but you need to do a couple of things to create a new color and apply to your Box component.

Define a theme with a custom color variable. You can use augmentColor() to generate the PaletteColor so it can be consumed in your Box then pass that new color into your component

import { red } from "@mui/material/colors";

const { palette } = createTheme();
const theme = createTheme({
  palette: {
    myCustomColor: palette.augmentColor({ color: red }),
    // Use this code if you want to use an arbitrary color
    // myCustomColor: palette.augmentColor({
    //   color: {
    //     main: "#f0000f"
    //   }
    // })
  }
});
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!