I want to fill the 128 boxes with different no. of colors. Let’s consider that I have 8 colors to fillup those boxes and please check the below visual representation for an expected output. I’ve tried by using the Javascript, but didn’t get the expected result, Looks like the logic is not correct!, Please correct me if anything wrong. Thanks,