legend collapse and color