Background color correctly assigned to legend