Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

282
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda