Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

272
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda