Heat Map not passing tests #6 and #15

My heat map cells and legend are using 10 colours. However the test scripts, throw errors for:

  1. There should be at least 4 different fill colors used for the cells.
    There should be four or more fill colors used for the cells : expected false to be true

  2. The elements in the legend should use at least 4 different fill colors
    There should be four or more fill colors used for the legend : expected false to be true

i cannot seem to figure out what the issue is.
Any help on this would be great.
This is the link to my code on github