Power table row and cell gradient coloring

I have developed a way for a separate problem that would work for the Boolean columns in this problem. The code has been posted here:

Also, I was able resolve this issue in the above example by simply subtracting a small margin from the cell rectangle dimensions.