added color legend and improved dynamic color scale