I need help to make variations according to quantity Javascript

Hello, does anyone have knowledge with Javascript. I have a product that has 9 different colors and I handle various combos.

1 pair
2 pairs
3 pairs
4 pairs

For example, if they selected the combo of 2 pairs, make show 2 cells (to select the color), combo of 3 show 3 cells etc.

I’ll stay tuned, thanks.

@Cristian we will need some screenshots to understand your request more! if you can provide some will be helpful!