I'm rendering data cards for Pokemon. Each pokemon type has an associated color. Fire is red, water is blue, grass is green. Some pokemon have one type, some pokemon have 2 types.
I want the background color to be either solid if the pokemon has one type, but the tricky part is I want the background to be a gradient if the pokemon has two types. For example, a Fire pokemon would have a solid red background, whereas a water/grass pokemon would be a blue/green gradient.
There are 18 pokemon types. For a total of 324 combinations. I know I could hardcode classes for each combination .fire-ice{colors} but there has to be a better solution.
How can achieve this programatically? I'm using sass and react