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’ }}