ensure colour for each rect is assigned to new variable and use for hover